[PATCH 12/18] nvme-fc: start error recovery instead of aborting timed out IOs
Hannes Reinecke
hare at suse.de
Mon Sep 21 00:33:43 PDT 2026
On 9/18/26 8:14 PM, Mohamed Khalfella wrote:
> Aborts issued from the timeout handler run outside the FCCTRL_TERMIO
> window, so they are not counted in ctrl->iocnt and
> nvme_fc_delete_association() does not wait for them. The association
> can be torn down while the LLDD is still working on the abort.
>
> Instead of aborting the timed out command, reset the controller like
> the other fabrics transports do. All aborts now happen in
> nvme_fc_delete_association(), where they are counted and waited for.
>
> The new nvme_fc_start_ioerr_recovery() queues ioerr_work directly in
> CONNECTING (abort the IOs so the connect attempt fails) and in
> DELETING/DELETING_NOIO (tear down the association so the IOs the
> delete path is draining get completed - the timeout handler no longer
> aborts them, and a dead target would otherwise hang controller
> deletion). In all other states it moves the controller to RESETTING
> first. Connectivity loss, disconnect LS and IO errors now go through
> the same entry point.
>
> With nvme_fc_timeout() no longer aborts timedout IOs the reset code
> in nvme_fc_reset_ctrl_work() needs to be updated to teardown the
> association before stopping the controller. This is important because
> nvme_stop_ctrl() waiting for ana_work or fw_act_work to be flushed can
> get stuck forever.
>
> Link: https://lore.kernel.org/all/20250529214928.2112990-1-mkhalfella@purestorage.com/
> Signed-off-by: Mohamed Khalfella <mkhalfella at purestorage.com>
> ---
> drivers/nvme/host/fc.c | 54 ++++++++++++++++++++++++++++--------------
> 1 file changed, 36 insertions(+), 18 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare at kernel.org>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list