• Song Liu's avatar
    md/r5cache: handle sync with data in write back cache · 5ddf0440
    Song Liu authored
    Currently, sync of raid456 array cannot make progress when hitting
    data in writeback r5cache.
    
    This patch fixes this issue by flushing cached data of the stripe
    before processing the sync request. This is achived by:
    
    1. In handle_stripe(), do not set STRIPE_SYNCING if the stripe is
       in write back cache;
    2. In r5c_try_caching_write(), handle the stripe in sync with write
       through;
    3. In do_release_stripe(), make stripe in sync write out and send
       it to the state machine.
    
    Shaohua: explictly set STRIPE_HANDLE after write out completed
    Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    5ddf0440
raid5-cache.c 86.5 KB