]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Sep 2017 08:37:45 +0000 (10:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Sep 2017 08:37:45 +0000 (10:37 +0200)
added patches:
md-raid5-release-flush-io-in-raid5_do_work.patch

queue-4.9/md-raid5-release-flush-io-in-raid5_do_work.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/md-raid5-release-flush-io-in-raid5_do_work.patch b/queue-4.9/md-raid5-release-flush-io-in-raid5_do_work.patch
new file mode 100644 (file)
index 0000000..3294a32
--- /dev/null
@@ -0,0 +1,45 @@
+From 9c72a18e46ebe0f09484cce8ebf847abdab58498 Mon Sep 17 00:00:00 2001
+From: Song Liu <songliubraving@fb.com>
+Date: Thu, 24 Aug 2017 09:53:59 -0700
+Subject: md/raid5: release/flush io in raid5_do_work()
+
+From: Song Liu <songliubraving@fb.com>
+
+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>
+
+---
+ drivers/md/raid5.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/md/raid5.c
++++ b/drivers/md/raid5.c
+@@ -5844,6 +5844,8 @@ static void raid5_do_work(struct work_st
+       spin_unlock_irq(&conf->device_lock);
++      r5l_flush_stripe_to_raid(conf->log);
++
+       async_tx_issue_pending_all();
+       blk_finish_plug(&plug);
index 5c530ede7c1a89e21df9312531db5d49c91462cc..f07ce494cbf9731662f9b5226b7949c993c47976 100644 (file)
@@ -75,3 +75,4 @@ xfs-fix-incorrect-log_flushed-on-fsync.patch
 xfs-don-t-set-v3-xflags-for-v2-inodes.patch
 xfs-open-code-end_buffer_async_write-in-xfs_finish_page_writeback.patch
 xfs-use-kmem_free-to-free-return-value-of-kmem_zalloc.patch
+md-raid5-release-flush-io-in-raid5_do_work.patch