Commit 918f0238 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

md: make sure a re-add after a restart honours bitmap when resyncing

Commit 17571284 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: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 59d9445e
......@@ -1972,7 +1972,8 @@ static int run(mddev_t *mddev)
!test_bit(In_sync, &disk->rdev->flags)) {
disk->head_position = 0;
mddev->degraded++;
conf->fullsync = 1;
if (disk->rdev)
conf->fullsync = 1;
}
}
if (mddev->degraded == conf->raid_disks) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment