• NeilBrown's avatar
    md/raid1: fix counting of write targets. · 7ab3fe4e
    NeilBrown authored
    commit 964147d5 upstream.
    
    There is a very small race window when writing to a
    RAID1 such that if a device is marked faulty at exactly the wrong
    time, the write-in-progress will not be sent to the device,
    but the bitmap (if present) will be updated to say that
    the write was sent.
    
    Then if the device turned out to still be usable as was re-added
    to the array, the bitmap-based-resync would skip resyncing that
    block, possibly leading to corruption.  This would only be a problem
    if no further writes were issued to that area of the device (i.e.
    that bitmap chunk).
    
    Suitable for any pending -stable kernel.
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    7ab3fe4e
raid1.c 62.3 KB