[PATCH v2 2/7] nvme_fc: change ctlr state assignments during reset/reconnect

Christoph Hellwig hch at infradead.org
Thu Oct 5 00:57:30 PDT 2017


>  	changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE);
> -	WARN_ON_ONCE(!changed);
>  
>  	ctrl->ctrl.nr_reconnects = 0;
>  
> -	nvme_start_ctrl(&ctrl->ctrl);
> +	if (changed)
> +		nvme_start_ctrl(&ctrl->ctrl);

It's just cosmetic, but can you folow the RDMA pattern here:

	changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE);
	if (!changed) {
		/* state change failure is ok if we're in DELETING state */
		WARN_ON_ONCE(ctrl->ctrl.state != NVME_CTRL_DELETING);
		return;
	}

else the patch looks fine:

Reviewed-by: Christoph Hellwig <hch at lst.de>



More information about the Linux-nvme mailing list