aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-08-22 17:01:52 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-22 22:52:46 -0400
commit918f02383fb9ff5dba29709f3199189eeac55021 (patch)
tree26a3b5edb812ba02ecf8020d6734d8d6a2f8080c /drivers/md
parent59d9445e851976d973a5a4009f80a3d55959d231 (diff)
md: make sure a re-add after a restart honours bitmap when resyncing
Commit 1757128438d41670ded8bc3bc735325cc07dc8f9 was slightly bad. If an array has a write-intent bitmap, and you remove a drive, then readd it, only the changed parts should be resynced. However after the above commit, this only works if the array has not been shut down and restarted. This is because it sets 'fullsync' at little more often than it should. This patch is more careful. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 650991bddd8e..ea2a58d28871 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1972,7 +1972,8 @@ static int run(mddev_t *mddev)
1972 !test_bit(In_sync, &disk->rdev->flags)) { 1972 !test_bit(In_sync, &disk->rdev->flags)) {
1973 disk->head_position = 0; 1973 disk->head_position = 0;
1974 mddev->degraded++; 1974 mddev->degraded++;
1975 conf->fullsync = 1; 1975 if (disk->rdev)
1976 conf->fullsync = 1;
1976 } 1977 }
1977 } 1978 }
1978 if (mddev->degraded == conf->raid_disks) { 1979 if (mddev->degraded == conf->raid_disks) {