md/raid10: avoid fullsync when not necessary.
This is the raid10 equivalent of
commit 4f0a5e012c
MD RAID1: Further conditionalize 'fullsync'
If a device in a newly assembled array is not fully recovered we
currently do a fully resync by don't need to.
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
+2
-1
@@ -3747,7 +3747,8 @@ static int run(struct mddev *mddev)
|
|||||||
!test_bit(In_sync, &disk->rdev->flags)) {
|
!test_bit(In_sync, &disk->rdev->flags)) {
|
||||||
disk->head_position = 0;
|
disk->head_position = 0;
|
||||||
mddev->degraded++;
|
mddev->degraded++;
|
||||||
if (disk->rdev)
|
if (disk->rdev &&
|
||||||
|
disk->rdev->saved_raid_disk < 0)
|
||||||
conf->fullsync = 1;
|
conf->fullsync = 1;
|
||||||
}
|
}
|
||||||
disk->recovery_disabled = mddev->recovery_disabled - 1;
|
disk->recovery_disabled = mddev->recovery_disabled - 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user