[RFC PATCH 12/14] nvme-fc: Decouple error recovery from controller reset

Randy Jennings randyj at purestorage.com
Thu Dec 18 18:59:09 PST 2025


On Tue, Nov 25, 2025 at 6:13 PM Mohamed Khalfella
<mkhalfella at purestorage.com> wrote:
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c

> +static void nvme_fc_start_ioerr_recovery(struct nvme_fc_ctrl *ctrl,
> +                                        char *errmsg);
>
>  /* *********************** FC-NVME Port Management ************************ */


> @@ -983,7 +985,7 @@ fc_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
>  static void nvme_fc_ctrl_put(struct nvme_fc_ctrl *);
>  static int nvme_fc_ctrl_get(struct nvme_fc_ctrl *);
>
> -static void nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg);
> +static void nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl);
does it make sense for nvme_fc_error_recovery() to move to be with
nvme_fc_start_ioerr_recovery()?

> @@ -2497,39 +2508,6 @@ __nvme_fc_abort_outstanding_ios(struct nvme_fc_ctrl *ctrl, bool start_queues)
>                 nvme_unquiesce_admin_queue(&ctrl->ctrl);
>  }
>
> -static void
> -nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg)

> @@ -3347,6 +3315,26 @@ nvme_fc_reset_ctrl_work(struct work_struct *work)
>         }
>  }
>
> +static void
> +nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl)
I'm curious about the motivation for moving the function.


> +{
> +       nvme_stop_keep_alive(&ctrl->ctrl);
This is a new addition.  I think it is a good one; FC can use
keep alives, and nvme_stop_keep_alive() is called in one
other place, but I do not think the Linux nvme-fc driver
uses keep alives.

Reviewed-by: Randy Jennings <randyj at purestorage.com>



More information about the Linux-nvme mailing list