[PATCH] md: assorted md and raid1 one-liners
commit58d81d98ecc8ead88c64b7b1d5a2c05ba0b782f8
authorNeilBrown <neilb@suse.de>
Thu, 25 Jan 2007 04:35:21 +0000 (25 15:35 +1100)
committerChris Wright <chrisw@sous-sol.org>
Mon, 5 Feb 2007 16:31:43 +0000 (5 08:31 -0800)
treef77b427a2a11aeef1c96efb1e1d34f09d7b0bfc8
parent92ad857a3c2e40b191c61d5afccdb20d74844766
[PATCH] 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: Chris Wright <chrisw@sous-sol.org>
drivers/md/md.c
drivers/md/raid1.c