• NeilBrown's avatar
    [PATCH] md: avoid backward event updates in md superblock when degraded. · 84692195
    NeilBrown authored
    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: default avatarNeil Brown <neilb@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
md.c 139 KB