Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2018-01-12 15:46:58 +0100
committerJohannes Thumshirn <jthumshirn@suse.de>2018-01-12 15:47:02 +0100
commit0e5402c9dc3ff10489b8e5c387749f125e445079 (patch)
treed5f83049be7a1ac4a6022b3a75b30ea8fd9bd915
parentfda3f322ac80d99cf3b307d165f054d72fcf8d28 (diff)
dm mpath: Use blk_path_error (FATE#323952, FATE#322506).
-rw-r--r--patches.drivers/dm-mpath-Use-blk_path_error.patch63
-rw-r--r--series.conf1
2 files changed, 64 insertions, 0 deletions
diff --git a/patches.drivers/dm-mpath-Use-blk_path_error.patch b/patches.drivers/dm-mpath-Use-blk_path_error.patch
new file mode 100644
index 0000000000..96e5aa266f
--- /dev/null
+++ b/patches.drivers/dm-mpath-Use-blk_path_error.patch
@@ -0,0 +1,63 @@
+From: Keith Busch <keith.busch@intel.com>
+Date: Tue, 9 Jan 2018 12:04:18 -0700
+Subject: dm mpath: Use blk_path_error
+Patch-mainline: Queued in subsystem maintainer repository
+Git-repo: git://git.kernel.dk/linux-block
+Git-commit: a1275677f8cd060bb8824fda66781d431560c714
+References: FATE#323952, FATE#322506
+
+Uses common code for determining if an error should be retried on
+alternate path.
+
+Acked-by: Mike Snitzer <snitzer@redhat.com>
+Reviewed-by: Hannes Reinecke <hare@suse.com>
+Signed-off-by: Keith Busch <keith.busch@intel.com>
+Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+---
+ drivers/md/dm-mpath.c | 19 ++-----------------
+ 1 file changed, 2 insertions(+), 17 deletions(-)
+
+--- a/drivers/md/dm-mpath.c
++++ b/drivers/md/dm-mpath.c
+@@ -1449,21 +1449,6 @@ static void activate_path_work(struct wo
+ activate_or_offline_path(pgpath);
+ }
+
+-static int noretry_error(blk_status_t error)
+-{
+- switch (error) {
+- case BLK_STS_NOTSUPP:
+- case BLK_STS_NOSPC:
+- case BLK_STS_TARGET:
+- case BLK_STS_NEXUS:
+- case BLK_STS_MEDIUM:
+- return 1;
+- }
+-
+- /* Anything else could be a path failure, so should be retried */
+- return 0;
+-}
+-
+ static int multipath_end_io(struct dm_target *ti, struct request *clone,
+ blk_status_t error, union map_info *map_context)
+ {
+@@ -1482,7 +1467,7 @@ static int multipath_end_io(struct dm_ta
+ * request into dm core, which will remake a clone request and
+ * clone bios for it and resubmit it later.
+ */
+- if (error && !noretry_error(error)) {
++ if (error && blk_path_error(error)) {
+ struct multipath *m = ti->private;
+
+ r = DM_ENDIO_REQUEUE;
+@@ -1518,7 +1503,7 @@ static int multipath_end_io_bio(struct d
+ unsigned long flags;
+ int r = DM_ENDIO_DONE;
+
+- if (!*error || noretry_error(*error))
++ if (!*error || !blk_path_error(*error))
+ goto done;
+
+ if (pgpath)
diff --git a/series.conf b/series.conf
index 87c05f1838..4dccfa6245 100644
--- a/series.conf
+++ b/series.conf
@@ -6505,6 +6505,7 @@
patches.drivers/nvme-multipath-Consult-blk_status_t-for-failover.patch
patches.drivers/block-Provide-blk_status_t-decoding-for-path-errors.patch
patches.drivers/nvme-multipath-Use-blk_path_error.patch
+ patches.drivers/dm-mpath-Use-blk_path_error.patch
# out-of-tree patches
patches.drivers/s390-sles15-00-04-04-kmsg-add-VNIC-Characteristics-msg-documentation.patch