Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

md/raid5: add thread_group worker async_tx_issue_pending_all

Since thread_group worker and raid5d kthread are not in sync, if
worker writes stripe before raid5d then requests will be waiting
for issue_pendig.

Issue observed when building raid5 with ext4, in some build runs
jbd2 would get hung and requests were waiting in the HW engine
waiting to be issued.

Fix this by adding a call to async_tx_issue_pending_all in the
raid5_do_work.

Signed-off-by: Ofer Heifetz <oferh@marvell.com>
Cc: stable@vger.kernel.org
Signed-off-by: Shaohua Li <shli@fb.com>

authored by

Ofer Heifetz and committed by
Shaohua Li
7e96d559 6308d8e3

+2
+2
drivers/md/raid5.c
··· 6234 6234 pr_debug("%d stripes handled\n", handled); 6235 6235 6236 6236 spin_unlock_irq(&conf->device_lock); 6237 + 6238 + async_tx_issue_pending_all(); 6237 6239 blk_finish_plug(&plug); 6238 6240 6239 6241 pr_debug("--- raid5worker inactive\n");