[linux] 02/03: xen-blkfront: fix accounting of reqs when migrating (Closes: #843715)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Thu Dec 29 18:08:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch jessie
in repository linux.

commit bb2768e82e203937ba8c7a0563a86610fac7c027
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Thu Dec 29 17:01:21 2016 +0000

    xen-blkfront: fix accounting of reqs when migrating (Closes: #843715)
---
 debian/changelog                                   |  1 +
 ...ont-fix-accounting-of-reqs-when-migrating.patch | 44 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 46 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 5cf8c8a..893947f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -513,6 +513,7 @@ linux (3.16.39-1) UNRELEASED; urgency=medium
     (sysctl: kernel.perf_event_paranoid=3)
   * spi-nor: Add support for n25q256a11 SPI flash device (Closes: #843650)
     (thanks to Matt Sickler)
+  * xen-blkfront: fix accounting of reqs when migrating (Closes: #843715)
 
   [ Julien Cristau ]
   * hwrng: Add chaoskey driver, backported from 4.8 (Closes: #839616)
diff --git a/debian/patches/bugfix/all/-xen-blkfront-fix-accounting-of-reqs-when-migrating.patch b/debian/patches/bugfix/all/-xen-blkfront-fix-accounting-of-reqs-when-migrating.patch
new file mode 100644
index 0000000..a907e95
--- /dev/null
+++ b/debian/patches/bugfix/all/-xen-blkfront-fix-accounting-of-reqs-when-migrating.patch
@@ -0,0 +1,44 @@
+From: Roger Pau Monne <roger.pau at citrix.com>
+Date: Mon, 2 Feb 2015 11:28:21 +0000
+Subject: xen-blkfront: fix accounting of reqs when migrating
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/linus/3bb8c98e5612f069010ad04e5f463389e2eb6563
+Bug-Debian: https://bugs.debian.org/843715
+
+Current migration code uses blk_put_request in order to finish a request
+before requeuing it. This function doesn't update the statistics of the
+queue, which completely screws accounting. Use blk_end_request_all instead
+which properly updates the statistics of the queue.
+
+Signed-off-by: Roger Pau Monné <roger.pau at citrix.com>
+Reported-and-Tested-by: Ouyang Zhaowei (Charles) <ouyangzhaowei at huawei.com>
+Cc: Konrad Rzeszutek Wilk <konrad.wilk at oracle.com>
+Cc: Boris Ostrovsky <boris.ostrovsky at oracle.com>
+Cc: David Vrabel <david.vrabel at citrix.com>
+Cc: xen-devel at lists.xenproject.org
+---
+ drivers/block/xen-blkfront.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -1489,7 +1489,7 @@ static int blkif_recover(struct blkfront
+ 		merge_bio.tail = copy[i].request->biotail;
+ 		bio_list_merge(&bio_list, &merge_bio);
+ 		copy[i].request->bio = NULL;
+-		blk_put_request(copy[i].request);
++		blk_end_request_all(copy[i].request, 0);
+ 	}
+ 
+ 	kfree(copy);
+@@ -1512,7 +1512,7 @@ static int blkif_recover(struct blkfront
+ 		req->bio = NULL;
+ 		if (req->cmd_flags & (REQ_FLUSH | REQ_FUA))
+ 			pr_alert("diskcache flush request found!\n");
+-		__blk_put_request(info->rq, req);
++		__blk_end_request_all(req, 0);
+ 	}
+ 	spin_unlock_irq(&info->io_lock);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 3f72b1d..558cb57 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -245,6 +245,7 @@ bugfix/all/revert-fs-give-dentry-to-inode_change_ok-instead-of-inode.patch
 bugfix/all/xfs-propagate-dentry-down-to-inode_change_ok.patch
 bugfix/all/fuse-propagate-dentry-down-to-inode_change_ok.patch
 bugfix/all/fs-give-dentry-to-inode_change_ok-instead-of-inode.patch
+bugfix/all/-xen-blkfront-fix-accounting-of-reqs-when-migrating.patch
 
 # memfd_create() & kdbus backport
 features/all/kdbus/mm-allow-drivers-to-prevent-new-writable-mappings.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list