Skip to content

Commit

Permalink
md/raid5: add thread_group worker async_tx_issue_pending_all
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ofer Heifetz authored and Shaohua Li committed Jul 24, 2017
1 parent 6308d8e commit 7e96d55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 7e96d55

Please sign in to comment.