From: Ofer Heifetz Date: Mon, 24 Jul 2017 06:17:40 +0000 (+0300) Subject: md/raid5: add thread_group worker async_tx_issue_pending_all X-Git-Tag: v4.13-rc3~14^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7e96d559634b73a8158ee99a7abece2eacec2668;p=karo-tx-linux.git 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 Cc: stable@vger.kernel.org Signed-off-by: Shaohua Li --- diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 4904dffec915..0fc2748aaf95 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -6234,6 +6234,8 @@ static void raid5_do_work(struct work_struct *work) pr_debug("%d stripes handled\n", handled); spin_unlock_irq(&conf->device_lock); + + async_tx_issue_pending_all(); blk_finish_plug(&plug); pr_debug("--- raid5worker inactive\n");