diff options
author | Jonathan Brassow <jbrassow@redhat.com> | 2012-05-21 23:55:31 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-05-21 23:55:31 -0400 |
commit | 4f0a5e012cf41321d611e7cad63e1017d143d138 (patch) | |
tree | 3018a9cb99e99d683174dc6ab2d2223a53b2a124 /drivers/md | |
parent | c32fb9e7ecee25a5b6a45bf968dfef76f323e185 (diff) |
MD RAID1: Further conditionalize 'fullsync'
A RAID1 device does not necessarily need a fullsync if the bitmap can be used instead.
Similar to commit d6b212f4b19da5301e6b6eca562e5c7a2a6e8c8d in raid5.c, if a raid1
device can be brought back (i.e. from a transient failure) it shouldn't need a
complete resync. Provided the bitmap is not to old, it will have recorded the areas
of the disk that need recovery.
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 8e717bd518e7..835de7168cd3 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -2600,7 +2600,8 @@ static struct r1conf *setup_conf(struct mddev *mddev) | |||
2600 | if (!disk->rdev || | 2600 | if (!disk->rdev || |
2601 | !test_bit(In_sync, &disk->rdev->flags)) { | 2601 | !test_bit(In_sync, &disk->rdev->flags)) { |
2602 | disk->head_position = 0; | 2602 | disk->head_position = 0; |
2603 | if (disk->rdev) | 2603 | if (disk->rdev && |
2604 | (disk->rdev->saved_raid_disk < 0)) | ||
2604 | conf->fullsync = 1; | 2605 | conf->fullsync = 1; |
2605 | } else if (conf->last_used < 0) | 2606 | } else if (conf->last_used < 0) |
2606 | /* | 2607 | /* |