All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/4] Fix host side state machine
@ 2018-01-24 16:57 Max Gurtovoy
  2018-01-24 16:57 ` [PATCH 1/4] nvme: rename NVME_CTRL_RECONNECTING state to NVME_CTRL_CONNECTING Max Gurtovoy
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Max Gurtovoy @ 2018-01-24 16:57 UTC (permalink / raw)


Hi all,
this series is rebased above nvme-4.16 and Jianchao Wang's commit:
"nvme-pci: introduce RECONNECTING state to mark initializing procedure"
Actually there is a still missing part in this tree (but I tested it on
my own "stable" mixed kernel):
"nvme-rdma: fix concurrent reset and reconnect" from Sagi.

The first motivation for this series was fixing RDMA initiator that crushes in
case we fail during initial connect and start error recovery during initial
connection establishment.
This patchset also renames NVME_CTRL_RECONNECTING to NVME_CTRL_CONNECTING as
this state doesn't represent only a reconnection flow but also used for
initialization process.
I haven't dived into the FC code yet (I can do it myself, but I would like to
have some comments from FC guys as well), but I guess we need to change a thing
or two in fc-host too.

Max Gurtovoy (4):
  nvme: rename NVME_CTRL_RECONNECTING state to NVME_CTRL_CONNECTING
  nvme-rdma: use NVME_CTRL_CONNECTING state to mark init process
  nvme: delete NVME_CTRL_LIVE --> NVME_CTRL_CONNECTING transition
  nvme: delete NVME_CTRL_NEW --> NVME_CTRL_LIVE transition

 drivers/nvme/host/core.c    | 13 ++++++-------
 drivers/nvme/host/fabrics.h |  9 +++++----
 drivers/nvme/host/fc.c      | 14 +++++++-------
 drivers/nvme/host/nvme.h    |  2 +-
 drivers/nvme/host/pci.c     |  8 ++++----
 drivers/nvme/host/rdma.c    |  7 +++++--
 6 files changed, 28 insertions(+), 25 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] nvme: rename NVME_CTRL_RECONNECTING state to NVME_CTRL_CONNECTING
  2018-01-24 16:57 [PATCH v1 0/4] Fix host side state machine Max Gurtovoy
@ 2018-01-24 16:57 ` Max Gurtovoy
  2018-01-24 16:57 ` [PATCH 2/4] nvme-rdma: use NVME_CTRL_CONNECTING state to mark init process Max Gurtovoy
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Max Gurtovoy @ 2018-01-24 16:57 UTC (permalink / raw)


In pci transport, this state is used to mark the initialization
process. This should be also used in other transports as well.

Signed-off-by: Max Gurtovoy <maxg at mellanox.com>
---
 drivers/nvme/host/core.c    | 10 +++++-----
 drivers/nvme/host/fabrics.h |  9 +++++----
 drivers/nvme/host/fc.c      | 14 +++++++-------
 drivers/nvme/host/nvme.h    |  2 +-
 drivers/nvme/host/pci.c     |  8 ++++----
 drivers/nvme/host/rdma.c    |  4 ++--
 6 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 63c2c46..c5114621 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -260,7 +260,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 	switch (new_state) {
 	case NVME_CTRL_ADMIN_ONLY:
 		switch (old_state) {
-		case NVME_CTRL_RECONNECTING:
+		case NVME_CTRL_CONNECTING:
 			changed = true;
 			/* FALLTHRU */
 		default:
@@ -271,7 +271,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:
+		case NVME_CTRL_CONNECTING:
 			changed = true;
 			/* FALLTHRU */
 		default:
@@ -289,7 +289,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 			break;
 		}
 		break;
-	case NVME_CTRL_RECONNECTING:
+	case NVME_CTRL_CONNECTING:
 		switch (old_state) {
 		case NVME_CTRL_LIVE:
 		case NVME_CTRL_RESETTING:
@@ -304,7 +304,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 		case NVME_CTRL_LIVE:
 		case NVME_CTRL_ADMIN_ONLY:
 		case NVME_CTRL_RESETTING:
-		case NVME_CTRL_RECONNECTING:
+		case NVME_CTRL_CONNECTING:
 			changed = true;
 			/* FALLTHRU */
 		default:
@@ -2673,7 +2673,7 @@ static ssize_t nvme_sysfs_show_state(struct device *dev,
 		[NVME_CTRL_LIVE]	= "live",
 		[NVME_CTRL_ADMIN_ONLY]	= "only-admin",
 		[NVME_CTRL_RESETTING]	= "resetting",
-		[NVME_CTRL_RECONNECTING]= "reconnecting",
+		[NVME_CTRL_CONNECTING]	= "connecting",
 		[NVME_CTRL_DELETING]	= "deleting",
 		[NVME_CTRL_DEAD]	= "dead",
 	};
diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
index 25b19f7..a3145d9 100644
--- a/drivers/nvme/host/fabrics.h
+++ b/drivers/nvme/host/fabrics.h
@@ -171,13 +171,14 @@ static inline blk_status_t nvmf_check_init_req(struct nvme_ctrl *ctrl,
 	    cmd->common.opcode != nvme_fabrics_command ||
 	    cmd->fabrics.fctype != nvme_fabrics_type_connect) {
 		/*
-		 * Reconnecting state means transport disruption, which can take
-		 * a long time and even might fail permanently, fail fast to
-		 * give upper layers a chance to failover.
+		 * Connecting state means transport disruption or initial
+		 * establishment, which can take a long time and even might
+		 * fail permanently, fail fast to give upper layers a chance
+		 * to failover.
 		 * Deleting state means that the ctrl will never accept commands
 		 * again, fail it permanently.
 		 */
-		if (ctrl->state == NVME_CTRL_RECONNECTING ||
+		if (ctrl->state == NVME_CTRL_CONNECTING ||
 		    ctrl->state == NVME_CTRL_DELETING) {
 			nvme_req(rq)->status = NVME_SC_ABORT_REQ;
 			return BLK_STS_IOERR;
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index b76ba46..b679971 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -534,7 +534,7 @@ static void __nvme_fc_delete_hw_queue(struct nvme_fc_ctrl *,
 {
 	switch (ctrl->ctrl.state) {
 	case NVME_CTRL_NEW:
-	case NVME_CTRL_RECONNECTING:
+	case NVME_CTRL_CONNECTING:
 		/*
 		 * As all reconnects were suppressed, schedule a
 		 * connect.
@@ -779,7 +779,7 @@ static void __nvme_fc_delete_hw_queue(struct nvme_fc_ctrl *,
 		}
 		break;
 
-	case NVME_CTRL_RECONNECTING:
+	case NVME_CTRL_CONNECTING:
 		/*
 		 * The association has already been terminated and the
 		 * controller is attempting reconnects.  No need to do anything
@@ -1724,7 +1724,7 @@ enum {
 	if (status &&
 	    (blk_queue_dying(rq->q) ||
 	     ctrl->ctrl.state == NVME_CTRL_NEW ||
-	     ctrl->ctrl.state == NVME_CTRL_RECONNECTING))
+	     ctrl->ctrl.state == NVME_CTRL_CONNECTING))
 		status |= cpu_to_le16(NVME_SC_DNR << 1);
 
 	if (__nvme_fc_fcpop_chk_teardowns(ctrl, op))
@@ -2951,7 +2951,7 @@ static inline blk_status_t nvme_fc_is_ready(struct nvme_fc_queue *queue,
 	unsigned long recon_delay = ctrl->ctrl.opts->reconnect_delay * HZ;
 	bool recon = true;
 
-	if (ctrl->ctrl.state != NVME_CTRL_RECONNECTING)
+	if (ctrl->ctrl.state != NVME_CTRL_CONNECTING)
 		return;
 
 	if (portptr->port_state == FC_OBJSTATE_ONLINE)
@@ -2999,10 +2999,10 @@ static inline blk_status_t nvme_fc_is_ready(struct nvme_fc_queue *queue,
 	/* will block will waiting for io to terminate */
 	nvme_fc_delete_association(ctrl);
 
-	if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_RECONNECTING)) {
+	if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
 		dev_err(ctrl->ctrl.device,
 			"NVME-FC{%d}: error_recovery: Couldn't change state "
-			"to RECONNECTING\n", ctrl->cnum);
+			"to CONNECTING\n", ctrl->cnum);
 		return;
 	}
 
@@ -3203,7 +3203,7 @@ static inline blk_status_t nvme_fc_is_ready(struct nvme_fc_queue *queue,
 	 * transport errors (frame drop, LS failure) inherently must kill
 	 * the association. The transport is coded so that any command used
 	 * to create the association (prior to a LIVE state transition
-	 * while NEW or RECONNECTING) will fail if it completes in error or
+	 * while NEW or CONNECTING) will fail if it completes in error or
 	 * times out.
 	 *
 	 * As such: as the connect request was mostly likely due to a
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 8e7fc1b..91529c9 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -123,7 +123,7 @@ enum nvme_ctrl_state {
 	NVME_CTRL_LIVE,
 	NVME_CTRL_ADMIN_ONLY,    /* Only admin queue live */
 	NVME_CTRL_RESETTING,
-	NVME_CTRL_RECONNECTING,
+	NVME_CTRL_CONNECTING,
 	NVME_CTRL_DELETING,
 	NVME_CTRL_DEAD,
 };
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 037bb86..5e69d84 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1143,7 +1143,7 @@ static bool nvme_should_reset(struct nvme_dev *dev, u32 csts)
 	/* If there is a reset/reinit ongoing, we shouldn't reset again. */
 	switch (dev->ctrl.state) {
 	case NVME_CTRL_RESETTING:
-	case NVME_CTRL_RECONNECTING:
+	case NVME_CTRL_CONNECTING:
 		return false;
 	default:
 		break;
@@ -2301,12 +2301,12 @@ static void nvme_reset_work(struct work_struct *work)
 		nvme_dev_disable(dev, false);
 
 	/*
-	 * Introduce RECONNECTING state from nvme-fc/rdma transports to mark the
+	 * Introduce CONNECTING state from nvme-fc/rdma transports to mark the
 	 * initializing procedure here.
 	 */
-	if (!nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_RECONNECTING)) {
+	if (!nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_CONNECTING)) {
 		dev_warn(dev->ctrl.device,
-			"failed to mark controller RECONNECTING\n");
+			"failed to mark controller CONNECTING\n");
 		goto out;
 	}
 
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 38e1834..489e2f8 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -888,7 +888,7 @@ static void nvme_rdma_free_ctrl(struct nvme_ctrl *nctrl)
 static void nvme_rdma_reconnect_or_remove(struct nvme_rdma_ctrl *ctrl)
 {
 	/* If we are resetting/deleting then do nothing */
-	if (ctrl->ctrl.state != NVME_CTRL_RECONNECTING) {
+	if (ctrl->ctrl.state != NVME_CTRL_CONNECTING) {
 		WARN_ON_ONCE(ctrl->ctrl.state == NVME_CTRL_NEW ||
 			ctrl->ctrl.state == NVME_CTRL_LIVE);
 		return;
@@ -979,7 +979,7 @@ static void nvme_rdma_error_recovery_work(struct work_struct *work)
 
 static void nvme_rdma_error_recovery(struct nvme_rdma_ctrl *ctrl)
 {
-	if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_RECONNECTING))
+	if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING))
 		return;
 
 	queue_work(nvme_wq, &ctrl->err_work);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] nvme-rdma: use NVME_CTRL_CONNECTING state to mark init process
  2018-01-24 16:57 [PATCH v1 0/4] Fix host side state machine Max Gurtovoy
  2018-01-24 16:57 ` [PATCH 1/4] nvme: rename NVME_CTRL_RECONNECTING state to NVME_CTRL_CONNECTING Max Gurtovoy
@ 2018-01-24 16:57 ` Max Gurtovoy
  2018-01-24 16:57 ` [PATCH 3/4] nvme: delete NVME_CTRL_LIVE --> NVME_CTRL_CONNECTING transition Max Gurtovoy
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Max Gurtovoy @ 2018-01-24 16:57 UTC (permalink / raw)


In order to avoid concurrent error recovery during initialization
process (allowed by the NVME_CTRL_NEW --> NVME_CTRL_RESETTING transition)
we must mark the ctrl as CONNECTING before initial connection
establisment.

Signed-off-by: Max Gurtovoy <maxg at mellanox.com>
---
 drivers/nvme/host/core.c | 1 +
 drivers/nvme/host/rdma.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index c5114621..071d163 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -291,6 +291,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 		break;
 	case NVME_CTRL_CONNECTING:
 		switch (old_state) {
+		case NVME_CTRL_NEW:
 		case NVME_CTRL_LIVE:
 		case NVME_CTRL_RESETTING:
 			changed = true;
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 489e2f8..629c034 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1933,6 +1933,9 @@ static struct nvme_ctrl *nvme_rdma_create_ctrl(struct device *dev,
 	if (!ctrl->queues)
 		goto out_uninit_ctrl;
 
+	changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING);
+	WARN_ON_ONCE(!changed);
+
 	ret = nvme_rdma_configure_admin_queue(ctrl, true);
 	if (ret)
 		goto out_kfree_queues;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] nvme: delete NVME_CTRL_LIVE --> NVME_CTRL_CONNECTING transition
  2018-01-24 16:57 [PATCH v1 0/4] Fix host side state machine Max Gurtovoy
  2018-01-24 16:57 ` [PATCH 1/4] nvme: rename NVME_CTRL_RECONNECTING state to NVME_CTRL_CONNECTING Max Gurtovoy
  2018-01-24 16:57 ` [PATCH 2/4] nvme-rdma: use NVME_CTRL_CONNECTING state to mark init process Max Gurtovoy
@ 2018-01-24 16:57 ` Max Gurtovoy
  2018-01-24 16:57 ` [PATCH 4/4] nvme: delete NVME_CTRL_NEW --> NVME_CTRL_LIVE transition Max Gurtovoy
  2018-01-24 19:33 ` [PATCH v1 0/4] Fix host side state machine Sagi Grimberg
  4 siblings, 0 replies; 7+ messages in thread
From: Max Gurtovoy @ 2018-01-24 16:57 UTC (permalink / raw)


There is no logical reason to move from live state to connecting
state. In case of initial connection establishment, the transition
should be NVME_CTRL_NEW --> NVME_CTRL_CONNECTING --> NVME_CTRL_LIVE.
In case of error recovery or reset, the transition should be
NVME_CTRL_LIVE --> NVME_CTRL_RESETTING --> NVME_CTRL_CONNECTING -->
NVME_CTRL_LIVE.

Signed-off-by: Max Gurtovoy <maxg at mellanox.com>
---
 drivers/nvme/host/core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 071d163..8e7ab93 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -292,7 +292,6 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 	case NVME_CTRL_CONNECTING:
 		switch (old_state) {
 		case NVME_CTRL_NEW:
-		case NVME_CTRL_LIVE:
 		case NVME_CTRL_RESETTING:
 			changed = true;
 			/* FALLTHRU */
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] nvme: delete NVME_CTRL_NEW --> NVME_CTRL_LIVE transition
  2018-01-24 16:57 [PATCH v1 0/4] Fix host side state machine Max Gurtovoy
                   ` (2 preceding siblings ...)
  2018-01-24 16:57 ` [PATCH 3/4] nvme: delete NVME_CTRL_LIVE --> NVME_CTRL_CONNECTING transition Max Gurtovoy
@ 2018-01-24 16:57 ` Max Gurtovoy
  2018-01-24 19:33 ` [PATCH v1 0/4] Fix host side state machine Sagi Grimberg
  4 siblings, 0 replies; 7+ messages in thread
From: Max Gurtovoy @ 2018-01-24 16:57 UTC (permalink / raw)


In order to get from "new" to "live" state we must "connect" (or
"reset" and "connect" in case of pci transport), so disable the
option for this transition.

Signed-off-by: Max Gurtovoy <maxg at mellanox.com>
---
 drivers/nvme/host/core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 8e7ab93..4f5065f 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -269,7 +269,6 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
 		break;
 	case NVME_CTRL_LIVE:
 		switch (old_state) {
-		case NVME_CTRL_NEW:
 		case NVME_CTRL_RESETTING:
 		case NVME_CTRL_CONNECTING:
 			changed = true;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v1 0/4] Fix host side state machine
  2018-01-24 16:57 [PATCH v1 0/4] Fix host side state machine Max Gurtovoy
                   ` (3 preceding siblings ...)
  2018-01-24 16:57 ` [PATCH 4/4] nvme: delete NVME_CTRL_NEW --> NVME_CTRL_LIVE transition Max Gurtovoy
@ 2018-01-24 19:33 ` Sagi Grimberg
  2018-01-25 11:31   ` Max Gurtovoy
  4 siblings, 1 reply; 7+ messages in thread
From: Sagi Grimberg @ 2018-01-24 19:33 UTC (permalink / raw)


The series looks reasonable to me, but we'll need James to
see if it works out for fc and keith to ack on Jianchao's patch first.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v1 0/4] Fix host side state machine
  2018-01-24 19:33 ` [PATCH v1 0/4] Fix host side state machine Sagi Grimberg
@ 2018-01-25 11:31   ` Max Gurtovoy
  0 siblings, 0 replies; 7+ messages in thread
From: Max Gurtovoy @ 2018-01-25 11:31 UTC (permalink / raw)




On 1/24/2018 9:33 PM, Sagi Grimberg wrote:
> The series looks reasonable to me, but we'll need James to
> see if it works out for fc and keith to ack on Jianchao's patch first.

James,
what do you think of the following untested changes to fc host:



diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 01df6d5..2922c20 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -2704,7 +2704,7 @@ static inline blk_status_t nvme_fc_is_ready(struct 
nvme_fc_queue *queue,
   * on the link side, recreates the controller association.
   */
  static int
-nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
+nvme_fc_create_association(struct nvme_fc_ctrl *ctrl, bool new)
  {
         struct nvmf_ctrl_options *opts = ctrl->ctrl.opts;
         int ret;
@@ -2735,7 +2735,7 @@ static inline blk_status_t nvme_fc_is_ready(struct 
nvme_fc_queue *queue,
         if (ret)
                 goto out_delete_hw_queue;

-       if (ctrl->ctrl.state != NVME_CTRL_NEW)
+       if (!new)
                 blk_mq_unquiesce_queue(ctrl->ctrl.admin_q);

         ret = nvmf_connect_admin_queue(&ctrl->ctrl);
@@ -2801,7 +2801,7 @@ static inline blk_status_t nvme_fc_is_ready(struct 
nvme_fc_queue *queue,
          */

         if (ctrl->ctrl.queue_count > 1) {
-               if (ctrl->ctrl.state == NVME_CTRL_NEW)
+               if (new)
                         ret = nvme_fc_create_io_queues(ctrl);
                 else
                         ret = nvme_fc_reinit_io_queues(ctrl);
@@ -3001,7 +3001,7 @@ static inline blk_status_t nvme_fc_is_ready(struct 
nvme_fc_queue *queue,
         }

         if (ctrl->rport->remoteport.port_state == FC_OBJSTATE_ONLINE)
-               ret = nvme_fc_create_association(ctrl);
+               ret = nvme_fc_create_association(ctrl, false);
         else
                 ret = -ENOTCONN;

@@ -3036,7 +3036,7 @@ static inline blk_status_t nvme_fc_is_ready(struct 
nvme_fc_queue *queue,
                         container_of(to_delayed_work(work),
                                 struct nvme_fc_ctrl, connect_work);

-       ret = nvme_fc_create_association(ctrl);
+       ret = nvme_fc_create_association(ctrl, false);
         if (ret)
                 nvme_fc_reconnect_or_delete(ctrl, ret);
         else
@@ -3090,6 +3090,7 @@ static inline blk_status_t nvme_fc_is_ready(struct 
nvme_fc_queue *queue,
         struct nvme_fc_ctrl *ctrl;
         unsigned long flags;
         int ret, idx, retry;
+       bool changed;

         if (!(rport->remoteport.port_role &
             (FC_PORT_ROLE_NVME_DISCOVERY | FC_PORT_ROLE_NVME_TARGET))) {
@@ -3206,8 +3207,11 @@ static inline blk_status_t 
nvme_fc_is_ready(struct nvme_fc_queue *queue,
          * request fails, retry the initial connection creation up to
          * three times before giving up and declaring failure.
          */
+       changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING);
+       WARN_ON_ONCE(!changed);
+
         for (retry = 0; retry < 3; retry++) {
-               ret = nvme_fc_create_association(ctrl);
+               ret = nvme_fc_create_association(ctrl, true);
                 if (!ret)
                         break;
         }


-Max.

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-01-25 11:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 16:57 [PATCH v1 0/4] Fix host side state machine Max Gurtovoy
2018-01-24 16:57 ` [PATCH 1/4] nvme: rename NVME_CTRL_RECONNECTING state to NVME_CTRL_CONNECTING Max Gurtovoy
2018-01-24 16:57 ` [PATCH 2/4] nvme-rdma: use NVME_CTRL_CONNECTING state to mark init process Max Gurtovoy
2018-01-24 16:57 ` [PATCH 3/4] nvme: delete NVME_CTRL_LIVE --> NVME_CTRL_CONNECTING transition Max Gurtovoy
2018-01-24 16:57 ` [PATCH 4/4] nvme: delete NVME_CTRL_NEW --> NVME_CTRL_LIVE transition Max Gurtovoy
2018-01-24 19:33 ` [PATCH v1 0/4] Fix host side state machine Sagi Grimberg
2018-01-25 11:31   ` Max Gurtovoy

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.