]> git.karo-electronics.de Git - karo-tx-linux.git/commit
raid5-cache: don't delay stripe captured in log
authorShaohua Li <shli@fb.com>
Fri, 4 Sep 2015 21:14:16 +0000 (14:14 -0700)
committerNeilBrown <neilb@suse.com>
Sun, 1 Nov 2015 02:48:27 +0000 (13:48 +1100)
commit253f9fd41afe2492b85de779946b5882a00dcdc5
treeb8861ac9970c0306dd05cb3fe0242ce953d79f4e
parent85f2f9a4f49d3e3230b3c5fb08362d561691421e
raid5-cache: don't delay stripe captured in log

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: Shaohua Li <shli@fb.com>
Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/raid5-cache.c