• NeilBrown's avatar
    md/raid5: avoid livelock caused by non-aligned writes. · 3d66de32
    NeilBrown authored
    commit a40687ff upstream.
    
    If a stripe in a raid6 array received a write to each data block while
    the array is degraded, and if any of these writes to a missing device
    are not page-aligned, then a live-lock happens.
    
    In this case the P and Q blocks need to be read so that the part of
    the missing block which is *not* being updated by the write can be
    constructed.  Due to a logic error, these blocks are not loaded, so
    the update cannot proceed and the stripe is 'handled' repeatedly in an
    infinite loop.
    
    This bug is unlikely as most writes are page aligned.  However as it
    can lead to a livelock it is suitable for -stable.  It was introduced
    in 3.16.
    
    Fixed: 67f45548Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    [ kamal: 3.13-stable preqreq for
      108cef3a "md/raid5: fetch_block must fetch all the blocks ..." ]
    Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
    3d66de32
raid5.c 198 KB