[PATCH 1/1] nvmet-fcloop: Check remoteport port_state before calling done callback

Daniel Wagner dwagner at suse.de
Fri Dec 5 04:31:08 PST 2025


On Thu, Dec 04, 2025 at 12:26:13PM -0800, Justin Tee wrote:
> -		 * Return success because this is what LLDDs do; silently
> -		 * drop the response.
> +		 * Return success when remoteport is still online because this
> +		 * is what LLDDs do and silently drop the response.  Otherwise,
> +		 * return with error to signal upper layer to perform the lsrsp
> +		 * resource cleanup.
>  		 */
> -		lsrsp->done(lsrsp);
> +		if (remoteport->port_state == FC_OBJSTATE_ONLINE)
> +			lsrsp->done(lsrsp);
> +		else
> +			ret = -ENODEV;

Is this what the hardware/driver would do as well? Originally, when
adding this code it return always an error and James told me that this
is not how the hardware/driver work. Though this was without checking
the port_state.

That said, I am fine doing this though, as it clearly fixes a problem.
Just wondering how far we can deviate from the 'real' thing.

In other words:

Reviewed-by: Daniel Wagner <dwagner at suse.de>




More information about the Linux-nvme mailing list