• Shaohua Li's avatar
    raid5-cache: don't delay stripe captured in log · 253f9fd4
    Shaohua Li authored
    There is a case a stripe gets delayed forever.
    1. a stripe finishes construction
    2. a new bio hits the stripe
    3. handle_stripe runs for the stripe. The stripe gets DELAYED bit set
    since construction can't run for new bio (the stripe is locked since
    step 1)
    
    Without log, handle_stripe will call ops_run_io. After IO finishes, the
    stripe gets unlocked and the stripe will restart and run construction
    for the new bio. With log, ops_run_io need to run two times. If the
    DELAYED bit set, the stripe can't enter into the handle_list, so the
    second ops_run_io doesn't run, which leaves the stripe stalled.
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    Signed-off-by: default avatarNeilBrown <neilb@suse.com>
    253f9fd4
raid5-cache.c 31.2 KB