aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-08-23 01:38:42 +0200
committerAdrian Bunk <bunk@stusta.de>2007-08-23 01:38:42 +0200
commitb3188291b5c6a9f9c2d6da21ef3f6d02f47d6c2e (patch)
treed058172dd51162592698792bd27c6d97f30172d7 /drivers/md/raid1.c
parent7524619e58de4fba43d4b5c56997c54109799e91 (diff)
md: assorted md and raid1 one-liners
Fix few bugs that meant that: - superblocks weren't alway written at exactly the right time (this could show up if the array was not written to - writting to the array causes lots of superblock updates and so hides these errors). - restarting device recovery after a clean shutdown (version-1 metadata only) didn't work as intended (or at all). 1/ Ensure superblock is updated when a new device is added. 2/ Remove an inappropriate test on MD_RECOVERY_SYNC in md_do_sync. The body of this if takes one of two branches depending on whether MD_RECOVERY_SYNC is set, so testing it in the clause of the if is wrong. 3/ Flag superblock for updating after a resync/recovery finishes. 4/ If we find the neeed to restart a recovery in the middle (version-1 metadata only) make sure a full recovery (not just as guided by bitmaps) does get done. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index b8889200718b..20dd22d3898f 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1898,6 +1898,7 @@ static int run(mddev_t *mddev)
if (!disk->rdev) {
disk->head_position = 0;
mddev->degraded++;
+ conf->fullsync = 1;
}
}