public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: james.smart@broadcom.com (James Smart)
Subject: [PATCH 2/4] nvme: implement 'async_connect' cli option
Date: Tue, 21 Aug 2018 14:01:51 -0700	[thread overview]
Message-ID: <7bdfe5fb-388a-2544-f140-ed6d9b264bfb@broadcom.com> (raw)
In-Reply-To: <20180821134329.69577-3-hare@suse.de>



On 8/21/2018 6:43 AM, Hannes Reinecke wrote:
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index 611e70cae754..90b4d8df275b 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -3081,7 +3081,8 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
>   		goto fail_ctrl;
>   	}
>   
> -	flush_delayed_work(&ctrl->connect_work);
> +	if (!opts->async_connect)
> +		flush_delayed_work(&ctrl->connect_work);
>   
>   	dev_info(ctrl->ctrl.device,
>   		"NVME-FC{%d}: new ctrl: NQN \"%s\"\n",
> diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
> index 0906acbb800e..82917dba9452 100644
> --- a/drivers/nvme/host/rdma.c
> +++ b/drivers/nvme/host/rdma.c
> @@ -2003,7 +2003,8 @@ static struct nvme_ctrl *nvme_rdma_create_ctrl(struct device *dev,
>   		goto out_uninit_ctrl;
>   	}
>   
> -	flush_delayed_work(&ctrl->reconnect_work);
> +	if (!opts->async_connect)
> +		flush_delayed_work(&ctrl->reconnect_work);
>   
>   	dev_info(ctrl->ctrl.device, "new ctrl: NQN \"%s\", addr %pISpcs\n",
>   		ctrl->ctrl.opts->subsysnqn, &ctrl->addr);

I would prefer that the check and flush occur in the common 
nvmf_create_ctrl() routine.? However, I know this means the core layer 
has to become aware of the work element which complicates things.? If 
you're willing to figure that out....

if not...
Reviewed-by:? James Smart? <james.smart at broadcom.com>

-- james

  reply	other threads:[~2018-08-21 21:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21 13:43 [RFC PATCH 0/4] nvme async-connect and discovery uevents Hannes Reinecke
2018-08-21 13:43 ` [PATCH 1/4] nvme-rdma: use reconnect_work for initial connect Hannes Reinecke
2018-08-21 14:10   ` Max Gurtovoy
2018-08-21 14:18     ` Hannes Reinecke
2018-08-21 13:43 ` [PATCH 2/4] nvme: implement 'async_connect' cli option Hannes Reinecke
2018-08-21 21:01   ` James Smart [this message]
2018-08-21 13:43 ` [PATCH 3/4] nvme: implement 'discovery' sysfs entry and discovery uevents Hannes Reinecke
2018-08-21 21:01   ` James Smart
2018-08-22  7:23     ` Hannes Reinecke
2018-08-22  8:51       ` Hannes Reinecke
2018-08-21 13:43 ` [PATCH 4/4] nvme: delete discovery controller after 2 minutes Hannes Reinecke
2018-08-21 21:01   ` James Smart
2018-08-22  7:32     ` Hannes Reinecke

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=7bdfe5fb-388a-2544-f140-ed6d9b264bfb@broadcom.com \
    --to=james.smart@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox