Skip to content

Commit

Permalink
md: make sure a re-add after a restart honours bitmap when resyncing
Browse files Browse the repository at this point in the history
Commit 1757128 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>
  • Loading branch information
neilbrown authored and Linus Torvalds committed Aug 23, 2007
1 parent 59d9445 commit 918f023
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 918f023

Please sign in to comment.