Skip to content

Commit 9c72a18

Browse files
liu-song-6shligit
authored andcommitted
md/raid5: release/flush io in raid5_do_work()
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+ Cc: [email protected] (4.4+) Signed-off-by: Song Liu <[email protected]> Signed-off-by: Shaohua Li <[email protected]>
1 parent 8031c3d commit 9c72a18

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/md/raid5.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6235,6 +6235,10 @@ static void raid5_do_work(struct work_struct *work)
62356235

62366236
spin_unlock_irq(&conf->device_lock);
62376237

6238+
flush_deferred_bios(conf);
6239+
6240+
r5l_flush_stripe_to_raid(conf->log);
6241+
62386242
async_tx_issue_pending_all();
62396243
blk_finish_plug(&plug);
62406244

0 commit comments

Comments
 (0)