]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] md: avoid backward event updates in md superblock when degraded.
authorNeilBrown <neilb@suse.de>
Sun, 27 Aug 2006 08:23:49 +0000 (01:23 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 27 Aug 2006 18:01:31 +0000 (11:01 -0700)
commit6ccbff1afc188b4ee780fc3a4d5e2b9eae2db711
tree6ef3e71914c83cf66330f5c0cf6cf2edebb0404a
parentef5cd31724cd76db42920225013dc0511a57fc67
[PATCH] md: avoid backward event updates in md superblock when degraded.

If we
  - shut down a clean array,
  - restart with one (or more) drive(s) missing
  - make some changes
  - pause, so that they array gets marked 'clean',
the event count on the superblock of included drives
will be the same as that of the removed drives.
So adding the removed drive back in will cause it
to be included with no resync.

To avoid this, we only update the eventcount backwards when the array
is not degraded.  In this case there can (should) be no non-connected
drives that we can get confused with, and this is the particular case
where updating-backwards is valuable.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/md.c