All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: axboe@kernel.dk, keith.busch@intel.com
Cc: linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/5] nvme: add new reconnecting controller state
Date: Mon,  6 Jun 2016 23:23:32 +0200	[thread overview]
Message-ID: <1465248215-18186-3-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1465248215-18186-1-git-send-email-hch@lst.de>

The nvme fabric (RDMA, FC, etc...) can introduce port, link or node
failures that may require a reconnect to re-establish the connection.

Add a new reconnecting state that will initially be used by the RDMA
driver.

Reviewed-by: Jay Freyensee <james.p.freyensee@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/nvme/host/core.c | 12 ++++++++++++
 drivers/nvme/host/nvme.h |  1 +
 2 files changed, 13 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 6f4361b..5bd5de1 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -88,6 +88,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 		switch (old_state) {
 		case NVME_CTRL_NEW:
 		case NVME_CTRL_RESETTING:
+		case NVME_CTRL_RECONNECTING:
 			changed = true;
 			/* FALLTHRU */
 		default:
@@ -98,6 +99,16 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 		switch (old_state) {
 		case NVME_CTRL_NEW:
 		case NVME_CTRL_LIVE:
+		case NVME_CTRL_RECONNECTING:
+			changed = true;
+			/* FALLTHRU */
+		default:
+			break;
+		}
+		break;
+	case NVME_CTRL_RECONNECTING:
+		switch (old_state) {
+		case NVME_CTRL_LIVE:
 			changed = true;
 			/* FALLTHRU */
 		default:
@@ -108,6 +119,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 		switch (old_state) {
 		case NVME_CTRL_LIVE:
 		case NVME_CTRL_RESETTING:
+		case NVME_CTRL_RECONNECTING:
 			changed = true;
 			/* FALLTHRU */
 		default:
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index d25eaab..a288974 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -74,6 +74,7 @@ enum nvme_ctrl_state {
 	NVME_CTRL_NEW,
 	NVME_CTRL_LIVE,
 	NVME_CTRL_RESETTING,
+	NVME_CTRL_RECONNECTING,
 	NVME_CTRL_DELETING,
 	NVME_CTRL_DEAD,
 };
-- 
2.1.4

WARNING: multiple messages have this Message-ID (diff)
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 2/5] nvme: add new reconnecting controller state
Date: Mon,  6 Jun 2016 23:23:32 +0200	[thread overview]
Message-ID: <1465248215-18186-3-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1465248215-18186-1-git-send-email-hch@lst.de>

The nvme fabric (RDMA, FC, etc...) can introduce port, link or node
failures that may require a reconnect to re-establish the connection.

Add a new reconnecting state that will initially be used by the RDMA
driver.

Reviewed-by: Jay Freyensee <james.p.freyensee at intel.com>
Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/core.c | 12 ++++++++++++
 drivers/nvme/host/nvme.h |  1 +
 2 files changed, 13 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 6f4361b..5bd5de1 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -88,6 +88,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 		switch (old_state) {
 		case NVME_CTRL_NEW:
 		case NVME_CTRL_RESETTING:
+		case NVME_CTRL_RECONNECTING:
 			changed = true;
 			/* FALLTHRU */
 		default:
@@ -98,6 +99,16 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 		switch (old_state) {
 		case NVME_CTRL_NEW:
 		case NVME_CTRL_LIVE:
+		case NVME_CTRL_RECONNECTING:
+			changed = true;
+			/* FALLTHRU */
+		default:
+			break;
+		}
+		break;
+	case NVME_CTRL_RECONNECTING:
+		switch (old_state) {
+		case NVME_CTRL_LIVE:
 			changed = true;
 			/* FALLTHRU */
 		default:
@@ -108,6 +119,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 		switch (old_state) {
 		case NVME_CTRL_LIVE:
 		case NVME_CTRL_RESETTING:
+		case NVME_CTRL_RECONNECTING:
 			changed = true;
 			/* FALLTHRU */
 		default:
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index d25eaab..a288974 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -74,6 +74,7 @@ enum nvme_ctrl_state {
 	NVME_CTRL_NEW,
 	NVME_CTRL_LIVE,
 	NVME_CTRL_RESETTING,
+	NVME_CTRL_RECONNECTING,
 	NVME_CTRL_DELETING,
 	NVME_CTRL_DEAD,
 };
-- 
2.1.4

  parent reply	other threads:[~2016-06-06 21:23 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 21:23 NVMe over Fabrics RDMA transport drivers Christoph Hellwig
2016-06-06 21:23 ` Christoph Hellwig
2016-06-06 21:23 ` [PATCH 1/5] blk-mq: Introduce blk_mq_reinit_tagset Christoph Hellwig
2016-06-06 21:23   ` Christoph Hellwig
2016-06-06 21:23 ` Christoph Hellwig [this message]
2016-06-06 21:23   ` [PATCH 2/5] nvme: add new reconnecting controller state Christoph Hellwig
2016-06-06 21:23 ` [PATCH 3/5] nvme-rdma.h: Add includes for nvme rdma_cm negotiation Christoph Hellwig
2016-06-06 21:23   ` Christoph Hellwig
2016-06-07 11:59   ` Sagi Grimberg
2016-06-07 11:59     ` Sagi Grimberg
2016-06-07 11:59     ` Sagi Grimberg
2016-06-06 21:23 ` [PATCH 4/5] nvmet-rdma: add a NVMe over Fabrics RDMA target driver Christoph Hellwig
2016-06-06 21:23   ` Christoph Hellwig
2016-06-07 12:00   ` Sagi Grimberg
2016-06-07 12:00     ` Sagi Grimberg
2016-06-09 21:42     ` Steve Wise
2016-06-09 21:42       ` Steve Wise
2016-06-09 21:42       ` Steve Wise
2016-06-09 21:54       ` Ming Lin
2016-06-09 21:54         ` Ming Lin
2016-06-09 21:54         ` Ming Lin
2016-06-14 14:32       ` Christoph Hellwig
2016-06-14 14:32         ` Christoph Hellwig
2016-06-14 14:32         ` Christoph Hellwig
2016-06-09 23:03     ` Steve Wise
2016-06-09 23:03       ` Steve Wise
2016-06-09 23:03       ` Steve Wise
2016-06-14 14:31       ` Christoph Hellwig
2016-06-14 14:31         ` Christoph Hellwig
2016-06-14 14:31         ` Christoph Hellwig
2016-06-14 15:14         ` Steve Wise
2016-06-14 15:14           ` Steve Wise
2016-06-14 15:14           ` Steve Wise
     [not found]         ` <00ea01d1c64f$64db8880$2e929980$@opengridcomputing.com>
2016-06-14 15:23           ` Steve Wise
2016-06-14 15:23             ` Steve Wise
2016-06-14 15:23             ` Steve Wise
2016-06-14 16:10       ` Steve Wise
2016-06-14 16:10         ` Steve Wise
2016-06-14 16:10         ` Steve Wise
2016-06-14 16:22         ` Steve Wise
2016-06-14 16:22           ` Steve Wise
2016-06-14 16:22           ` Steve Wise
2016-06-15 18:32           ` Sagi Grimberg
2016-06-15 18:32             ` Sagi Grimberg
2016-06-15 18:32             ` Sagi Grimberg
2016-06-14 16:47         ` Hefty, Sean
2016-06-14 16:47           ` Hefty, Sean
2016-06-14 16:47           ` Hefty, Sean
2016-06-06 21:23 ` [PATCH 5/5] nvme-rdma: add a NVMe over Fabrics RDMA host driver Christoph Hellwig
2016-06-06 21:23   ` Christoph Hellwig
2016-06-07 12:00   ` Sagi Grimberg
2016-06-07 12:00     ` Sagi Grimberg
2016-06-07 12:00     ` Sagi Grimberg
2016-06-07 14:47   ` Keith Busch
2016-06-07 14:47     ` Keith Busch
2016-06-07 15:15     ` Freyensee, James P
2016-06-07 15:15       ` Freyensee, James P
2016-06-07 15:15       ` Freyensee, James P
2016-06-07 11:57 ` NVMe over Fabrics RDMA transport drivers Sagi Grimberg
2016-06-07 11:57   ` Sagi Grimberg
2016-06-07 12:01   ` Christoph Hellwig
2016-06-07 12:01     ` Christoph Hellwig
2016-06-07 12:01     ` Christoph Hellwig
2016-06-07 14:55   ` Woodruff, Robert J
2016-06-07 14:55     ` Woodruff, Robert J
2016-06-07 14:55     ` Woodruff, Robert J
2016-06-07 20:14     ` Steve Wise
2016-06-07 20:14       ` Steve Wise
2016-06-07 20:27       ` Christoph Hellwig
2016-06-07 20:27         ` Christoph Hellwig
2016-07-06 12:55 NVMe over Fabrics RDMA transport drivers V2 Christoph Hellwig
2016-07-06 12:55 ` [PATCH 2/5] nvme: add new reconnecting controller state Christoph Hellwig
2016-07-06 12:55   ` Christoph Hellwig
2016-07-06 12:55   ` Christoph Hellwig
2016-07-08 13:47   ` Steve Wise
2016-07-08 13:47     ` Steve Wise
2016-07-08 13:47     ` Steve Wise

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=1465248215-18186-3-git-send-email-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    /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.