diff options
author | NeilBrown <neilb@suse.de> | 2014-01-14 16:30:10 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-01-14 16:44:21 +1100 |
commit | 0b59bb6422e43ad0534073e2cbc4d0f52720da88 (patch) | |
tree | 42091a7d809216ef68b5f41e5a90d6a039538932 /drivers/md | |
parent | 7eb418851f3278de67126ea0c427641ab4792c57 (diff) |
md/raid10: avoid fullsync when not necessary.
This is the raid10 equivalent of
commit 4f0a5e012cf41321d611e7cad63e1017d143d138
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>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid10.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 06eeb99ea6f..8d39d63281b 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -3747,7 +3747,8 @@ static int run(struct mddev *mddev) !test_bit(In_sync, &disk->rdev->flags)) { disk->head_position = 0; mddev->degraded++; - if (disk->rdev) + if (disk->rdev && + disk->rdev->saved_raid_disk < 0) conf->fullsync = 1; } disk->recovery_disabled = mddev->recovery_disabled - 1; |