Commit b89a99cf authored by Ofer Heifetz's avatar Ofer Heifetz Committed by Sasha Levin

md/raid5: add thread_group worker async_tx_issue_pending_all

[ Upstream commit 7e96d559 ]

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: default avatarOfer Heifetz <oferh@marvell.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarShaohua Li <shli@fb.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 333ff174
...@@ -5799,6 +5799,8 @@ static void raid5_do_work(struct work_struct *work) ...@@ -5799,6 +5799,8 @@ static void raid5_do_work(struct work_struct *work)
pr_debug("%d stripes handled\n", handled); pr_debug("%d stripes handled\n", handled);
spin_unlock_irq(&conf->device_lock); spin_unlock_irq(&conf->device_lock);
async_tx_issue_pending_all();
blk_finish_plug(&plug); blk_finish_plug(&plug);
pr_debug("--- raid5worker inactive\n"); pr_debug("--- raid5worker inactive\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment