All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Linux Block <linux-block@vger.kernel.org>,
	Linux NVMe <linux-nvme@lists.infradead.org>,
	Device Mapper <dm-devel@redhat.com>,
	Christoph Hellwig <hch@lst.de>, Mike Snitzer <snitzer@redhat.com>,
	Jens Axboe <axboe@kernel.dk>
Cc: Bart VanAssche <bart.vanassche@wdc.com>,
	James Smart <james.smart@broadcom.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Hannes Reinecke <hare@suse.com>, Sagi Grimberg <sagi@grimberg.me>,
	Keith Busch <keith.busch@intel.com>
Subject: [PATCHv2 4/5] nvme/multipath: Use blk_path_error
Date: Tue,  9 Jan 2018 12:04:17 -0700	[thread overview]
Message-ID: <20180109190418.7123-5-keith.busch@intel.com> (raw)
In-Reply-To: <20180109190418.7123-1-keith.busch@intel.com>

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>
---
 drivers/nvme/host/multipath.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index ae9abb600c0f..3b211d9e58b8 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -37,19 +37,7 @@ bool nvme_req_needs_failover(struct request *req, blk_status_t error)
 {
 	if (!(req->cmd_flags & REQ_NVME_MPATH))
 		return false;
-
-	switch (error) {
-	case BLK_STS_NOTSUPP:
-	case BLK_STS_NOSPC:
-	case BLK_STS_TARGET:
-	case BLK_STS_NEXUS:
-	case BLK_STS_MEDIUM:
-	case BLK_STS_PROTECTION:
-		return false;
-	}
-
-	/* Everything else could be a path failure, so should be retried */
-	return true;
+	return blk_path_error(error);
 }
 
 void nvme_kick_requeue_lists(struct nvme_ctrl *ctrl)
-- 
2.13.6

WARNING: multiple messages have this Message-ID (diff)
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCHv2 4/5] nvme/multipath: Use blk_path_error
Date: Tue,  9 Jan 2018 12:04:17 -0700	[thread overview]
Message-ID: <20180109190418.7123-5-keith.busch@intel.com> (raw)
In-Reply-To: <20180109190418.7123-1-keith.busch@intel.com>

Uses common code for determining if an error should be retried on
alternate path.

Acked-by: Mike Snitzer <snitzer at redhat.com>
Reviewed-by: Hannes Reinecke <hare at suse.com>
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
 drivers/nvme/host/multipath.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index ae9abb600c0f..3b211d9e58b8 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -37,19 +37,7 @@ bool nvme_req_needs_failover(struct request *req, blk_status_t error)
 {
 	if (!(req->cmd_flags & REQ_NVME_MPATH))
 		return false;
-
-	switch (error) {
-	case BLK_STS_NOTSUPP:
-	case BLK_STS_NOSPC:
-	case BLK_STS_TARGET:
-	case BLK_STS_NEXUS:
-	case BLK_STS_MEDIUM:
-	case BLK_STS_PROTECTION:
-		return false;
-	}
-
-	/* Everything else could be a path failure, so should be retried */
-	return true;
+	return blk_path_error(error);
 }
 
 void nvme_kick_requeue_lists(struct nvme_ctrl *ctrl)
-- 
2.13.6

  parent reply	other threads:[~2018-01-09 19:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 19:04 [PATCHv2 0/5] nvme/dm failover unification Keith Busch
2018-01-09 19:04 ` Keith Busch
2018-01-09 19:04 ` [PATCHv2 1/5] nvme: Add more command status translation Keith Busch
2018-01-09 19:04   ` Keith Busch
2018-01-10  7:58   ` [dm-devel] " Johannes Thumshirn
2018-01-10  7:58     ` Johannes Thumshirn
2018-01-10  7:58     ` Johannes Thumshirn
2018-01-09 19:04 ` [PATCHv2 2/5] nvme/multipath: Consult blk_status_t for failover Keith Busch
2018-01-09 19:04   ` Keith Busch
2018-01-10  8:02   ` [dm-devel] " Johannes Thumshirn
2018-01-10  8:02     ` Johannes Thumshirn
2018-01-10  8:02     ` Johannes Thumshirn
2018-01-09 19:04 ` [PATCHv2 3/5] block: Provide blk_status_t decoding for path errors Keith Busch
2018-01-09 19:04   ` Keith Busch
2018-01-10  8:06   ` [dm-devel] " Johannes Thumshirn
2018-01-10  8:06     ` Johannes Thumshirn
2018-01-10  8:06     ` Johannes Thumshirn
2018-01-09 19:04 ` Keith Busch [this message]
2018-01-09 19:04   ` [PATCHv2 4/5] nvme/multipath: Use blk_path_error Keith Busch
2018-01-10  8:06   ` [dm-devel] " Johannes Thumshirn
2018-01-10  8:06     ` Johannes Thumshirn
2018-01-10  8:06     ` Johannes Thumshirn
2018-01-09 19:04 ` [PATCHv2 5/5] dm mpath: " Keith Busch
2018-01-09 19:04   ` Keith Busch
2018-01-10  8:07   ` [dm-devel] " Johannes Thumshirn
2018-01-10  8:07     ` Johannes Thumshirn
2018-01-10  8:07     ` Johannes Thumshirn
2018-01-10  8:28 ` [PATCHv2 0/5] nvme/dm failover unification Christoph Hellwig
2018-01-10  8:28   ` Christoph Hellwig
2018-01-10 17:52   ` Jens Axboe
2018-01-10 17:52     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180109190418.7123-5-keith.busch@intel.com \
    --to=keith.busch@intel.com \
    --cc=axboe@kernel.dk \
    --cc=bart.vanassche@wdc.com \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=james.smart@broadcom.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=martin.petersen@oracle.com \
    --cc=sagi@grimberg.me \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.