• N
    Ensure interrupted recovery completed properly (v1 metadata plus bitmap) · 8c2e870a
    Neil Brown 提交于
    If, while assembling an array, we find a device which is not fully
    in-sync with the array, it is important to set the "fullsync" flags.
    This is an exact analog to the setting of this flag in hot_add_disk
    methods.
    
    Currently, only v1.x metadata supports having devices in an array
    which are not fully in-sync (it keep track of how in sync they are).
    The 'fullsync' flag only makes a difference when a write-intent bitmap
    is being used.  In this case it tells recovery to ignore the bitmap
    and recovery all blocks.
    
    This fix is already in place for raid1, but not raid5/6 or raid10.
    
    So without this fix, a raid1 ir raid4/5/6 array with version 1.x
    metadata and a write intent bitmaps, that is stopped in the middle
    of a recovery, will appear to complete the recovery instantly
    after it is reassembled, but the recovery will not be correct.
    
    If you might have an array like that, issueing
       echo repair > /sys/block/mdXX/md/sync_action
    
    will make sure recovery completes properly.
    
    Cc: <stable@kernel.org>
    Signed-off-by: NNeil Brown <neilb@suse.de>
    8c2e870a
raid10.c 60.4 KB