• NeilBrown's avatar
    md/raid5: need_this_block: tidy/fix last condition. · ea664c82
    NeilBrown authored
    That last condition is unclear and over cautious.
    
    There are two related issues here.
    
    If a partial write is destined for a missing device, then
    either RMW or RCW can work.  We must read all the available
    block.  Only then can the missing blocks be calculated, and
    then the parity update performed.
    
    If RMW is not an option, then there is a complication even
    without partial writes.  If we would need to read a missing
    device to perform the reconstruction, then we must first read every
    block so the missing device data can be computed.
    This is the case for RAID6 (Which currently does not support
    RMW) and for times when we don't trust the parity (after a crash)
    and so are in the process of resyncing it.
    
    So make these two cases more clear and separate, and perform
    the relevant tests more  thoroughly.
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    ea664c82
raid5.c 202 KB