[PATCH v1 1/2] nvme-fc: go straight to connecting state when initializing
Hannes Reinecke
hare at suse.de
Fri Jul 26 07:48:54 PDT 2024
On 6/11/24 21:06, Daniel Wagner wrote:
> The initial controller initialization mimiks the reconnect loop
> behavior by switching from NEW to RESETTING and then to CONNECTING.
>
> The transition from NEW to CONNECTING is a valid transition, so there is
> no point entering the RESETTING state. TCP and RDMA also transition
> directly to CONNECTING state.
>
> Signed-off-by: Daniel Wagner <dwagner at suse.de>
> ---
> drivers/nvme/host/fc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index f0b081332749..6ff28d59b169 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -3551,8 +3551,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
> list_add_tail(&ctrl->ctrl_list, &rport->ctrl_list);
> spin_unlock_irqrestore(&rport->lock, flags);
>
> - if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_RESETTING) ||
> - !nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
> + if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
> dev_err(ctrl->ctrl.device,
> "NVME-FC{%d}: failed to init ctrl state\n", ctrl->cnum);
> goto fail_ctrl;
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Ivo Totev, Andrew McDonald,
Werner Knoblich
More information about the Linux-nvme
mailing list