[PATCH v5 12/16] nvme-fc: Refactor IO error recovery
Hannes Reinecke
hare at suse.de
Mon Jul 13 00:29:44 PDT 2026
On 7/12/26 4:23 AM, Mohamed Khalfella wrote:
> Added new nvme_fc_start_ioerr_recovery() to trigger error recovery
> instead of directly queueing ctrl->ioerr_work. nvme_fc_error_recovery()
> now called only from ctrl->ioerr_work has been updated to not depend on
> nvme_reset_ctrl() to handle error recovery. nvme_fc_error_recovery()
> effectively resets the controller and attempts reconnection if needed.
> This makes nvme-fc ioerr handling similar to other fabric transports.
>
> Update nvme_fc_timeout() to not abort timed out IOs. IOs aborted from
> nvme_fc_timeout() are not accounted for in ctrl->iocnt and this causes
> nvme_fc_delete_association() not to wait for them. Instead of aborting
> IOs nvme_fc_timeout() calls nvme_fc_start_ioerr_recovery() to start IO
> error recovery. Since error recovery runs in ctrl->ioerr_work this
> change fixes the issue reported in the link below.
>
> 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 | 119 +++++++++++++++++++++++------------------
> 1 file changed, 66 insertions(+), 53 deletions(-)
>
This is hard to read. Please split it several parst, one with
open-coding nvme_reset_work(), one with adding
nvme_fc_start_ioerr_recovery((), and another one with the rest.
If that makes sense to you...
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