]> git.hungrycats.org Git - linux/commitdiff
md/raid5: add thread_group worker async_tx_issue_pending_all
authorOfer Heifetz <oferh@marvell.com>
Mon, 24 Jul 2017 06:17:40 +0000 (09:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Aug 2017 16:21:09 +0000 (09:21 -0700)
commit 7e96d559634b73a8158ee99a7abece2eacec2668 upstream.

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>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid5.c

index d524daddc6300b27c7c05f49775816cdbae8863e..e92dd2dc4b5a13d76c7f0fa58666570faa39f87f 100644 (file)
@@ -6237,6 +6237,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");