]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Mar 2017 12:00:08 +0000 (14:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Mar 2017 12:00:08 +0000 (14:00 +0200)
queue-3.18/raid10-increment-write-counter-after-bio-is-split.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/raid10-increment-write-counter-after-bio-is-split.patch b/queue-3.18/raid10-increment-write-counter-after-bio-is-split.patch
new file mode 100644 (file)
index 0000000..d5faf24
--- /dev/null
@@ -0,0 +1,42 @@
+From 9b622e2bbcf049c82e2550d35fb54ac205965f50 Mon Sep 17 00:00:00 2001
+From: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
+Date: Thu, 28 Jul 2016 10:28:25 +0200
+Subject: raid10: increment write counter after bio is split
+
+From: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
+
+commit 9b622e2bbcf049c82e2550d35fb54ac205965f50 upstream.
+
+md pending write counter must be incremented after bio is split,
+otherwise it gets decremented too many times in end bio callback and
+becomes negative.
+
+Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
+Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
+Signed-off-by: Shaohua Li <shli@fb.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/raid10.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/md/raid10.c
++++ b/drivers/md/raid10.c
+@@ -1171,6 +1171,8 @@ static void __make_request(struct mddev
+       int max_sectors;
+       int sectors;
++      md_write_start(mddev, bio);
++
+       /*
+        * Register the new request and wait if the reconstruction
+        * thread has put up a bar for new requests.
+@@ -1556,8 +1558,6 @@ static void make_request(struct mddev *m
+               return;
+       }
+-      md_write_start(mddev, bio);
+-
+       do {
+               /*
index 95b84b800a5f92437384531b8187d27b1fc645f4..a803b1163efb6050819ae35f2a9579d8425135b0 100644 (file)
@@ -61,3 +61,4 @@ lib-vsprintf.c-improve-sanity-check-in-vsnprintf.patch
 tty-n_hdlc-fix-lockdep-false-positive.patch
 tty-n_hdlc-get-rid-of-racy-n_hdlc.tbuf.patch
 cancel-the-setfilesize-transation-when-io-error-happen.patch
+raid10-increment-write-counter-after-bio-is-split.patch