Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2018-10-10 08:12:43 +0200
committerHannes Reinecke <hare@suse.de>2018-10-10 08:29:13 +0200
commit955627f4c02dae8b2336fb06226f43552c0736c9 (patch)
tree0f5c45ff4c98483a099c8cc34ecbf7b2aa1dcb47
parent82521a6a07422516478b7d3154435b628daaa12d (diff)
dm-mpath: finally fixup cmd_flags (bsc#1110930).rpm-4.4.156-94.61
-rw-r--r--patches.suse/dm-mpath-finally-fixup-cmd_flags.patch51
-rw-r--r--series.conf1
2 files changed, 52 insertions, 0 deletions
diff --git a/patches.suse/dm-mpath-finally-fixup-cmd_flags.patch b/patches.suse/dm-mpath-finally-fixup-cmd_flags.patch
new file mode 100644
index 0000000000..e1f82eae55
--- /dev/null
+++ b/patches.suse/dm-mpath-finally-fixup-cmd_flags.patch
@@ -0,0 +1,51 @@
+From: Hannes Reinecke <hare@suse.de>
+Date: Wed, 10 Oct 2018 08:05:53 +0200
+Subject: [PATCH] dm-mpath: finally fixup cmd_flags
+Patch-Mainline: never, SLE12 SP3 specific
+References: bsc#1110930
+
+If we don't have an 'rq' argument for __multipath_map() it means we
+are called via the 'map_rq' function, which has the cloned request
+already initialized. But as we don't have access to the original
+request we really don't have a good way of initializing the flags
+of the cloned request, other than setting the failfast bits.
+The remaining initialisation has to be done in setup_clone().
+
+Signed-off-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/md/dm-mpath.c | 6 +-----
+ drivers/md/dm-rq.c | 1 +
+ 2 files changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
+index 6d116deb2ba4..a01067e01739 100644
+--- a/drivers/md/dm-mpath.c
++++ b/drivers/md/dm-mpath.c
+@@ -561,11 +561,7 @@ static int __multipath_map(struct dm_target *ti, struct request *clone,
+ */
+ clone->q = bdev_get_queue(bdev);
+ clone->rq_disk = bdev->bd_disk;
+- if (rq)
+- clone->cmd_flags = rq->cmd_flags;
+- else
+- clone->cmd_flags = 0;
+- clone->cmd_flags |= REQ_NOMERGE | REQ_FAILFAST_TRANSPORT;
++ clone->cmd_flags |= REQ_FAILFAST_TRANSPORT;
+ } else {
+ /*
+ * blk-mq request-based interface; used by both:
+diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
+index a0701a7fd016..d1a93c0e4b9f 100644
+--- a/drivers/md/dm-rq.c
++++ b/drivers/md/dm-rq.c
+@@ -498,6 +498,7 @@ static int setup_clone(struct request *clone, struct request *rq,
+ if (r)
+ return r;
+
++ clone->cmd_flags = rq->cmd_flags | REQ_NOMERGE;
+ clone->end_io = end_clone_request;
+ clone->end_io_data = tio;
+
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 38ecbcf7b9..ae3a8f1dd9 100644
--- a/series.conf
+++ b/series.conf
@@ -20345,6 +20345,7 @@
patches.drivers/dm-mpath-do-not-lock-up-a-CPU-with-requeuing-activit.patch
patches.suse/dm-Always-copy-cmd_flags-when-cloning-a-request.patch
patches.fixes/dm-mpath-do-not-try-to-access-NULL-rq.patch
+ patches.suse/dm-mpath-finally-fixup-cmd_flags.patch
# bsc#1078609
patches.fixes/0001-md-raid1-Use-a-new-variable-to-count-flighting-sync-.patch
patches.fixes/0002-md-document-lifetime-of-internal-rdev-pointer.patch