diff options
author | 2017-08-24 09:53:59 -0700 | |
---|---|---|
committer | 2017-09-20 08:22:11 +0200 | |
commit | 7816eb3874a273dc9461c78cdc3280a2437bc280 (patch) | |
tree | f90f370016f0ad8233e99963c6a06355891bf241 | |
parent | md/raid1/10: reset bio allocated from mempool (diff) | |
download | linux-stable-7816eb3874a273dc9461c78cdc3280a2437bc280.tar.xz linux-stable-7816eb3874a273dc9461c78cdc3280a2437bc280.zip |
md/raid5: release/flush io in raid5_do_work()
commit 9c72a18e46ebe0f09484cce8ebf847abdab58498 upstream.
In raid5, there are scenarios where some ios are deferred to a later
time, and some IO need a flush to complete. To make sure we make
progress with these IOs, we need to call the following functions:
flush_deferred_bios(conf);
r5l_flush_stripe_to_raid(conf->log);
Both of these functions are called in raid5d(), but missing in
raid5_do_work(). As a result, these functions are not called
when multi-threading (group_thread_cnt > 0) is enabled. This patch
adds calls to these function to raid5_do_work().
Note for stable branches:
r5l_flush_stripe_to_raid(conf->log) is need for 4.4+
flush_deferred_bios(conf) is only needed for 4.11+
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/md/raid5.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index e92dd2dc4b5a..2280bae40189 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -6238,6 +6238,10 @@ static void raid5_do_work(struct work_struct *work) spin_unlock_irq(&conf->device_lock); + flush_deferred_bios(conf); + + r5l_flush_stripe_to_raid(conf->log); + async_tx_issue_pending_all(); blk_finish_plug(&plug); |