[PATCH v4 13/15] nvme-fc: Use CCR to recover controller that hits an error
Randy Jennings
randyj at purestorage.com
Fri May 15 17:20:45 PDT 2026
On Fri, Mar 27, 2026 at 5:46 PM Mohamed Khalfella
<mkhalfella at purestorage.com> wrote:
>
> An alive nvme controller that hits an error now will move to FENCING
> state instead of RESETTING state. ctrl->fencing_work attempts CCR to
> terminate inflight IOs. Regardless of the success or failure of CCR
> operation the controller is transitioned to RESETTING state to continue
> error recovery process.
>
> Signed-off-by: Mohamed Khalfella <mkhalfella at purestorage.com>
> +static void nvme_fc_fencing_work(struct work_struct *work)
> +{
> + struct nvme_fc_ctrl *fc_ctrl =
> + container_of(work, struct nvme_fc_ctrl, fencing_work);
> + struct nvme_ctrl *ctrl = &fc_ctrl->ctrl;
> + int ret;
> +
> + ret = nvme_fence_ctrl(ctrl);
> + if (ret)
> + dev_info(ctrl->device, "CCR failed with error %d\n", ret);
> +
> + nvme_change_ctrl_state(ctrl, NVME_CTRL_FENCED);
> + if (nvme_change_ctrl_state(ctrl, NVME_CTRL_RESETTING))
> + queue_work(nvme_reset_wq, &fc_ctrl->ioerr_work);
As with the other transports, I think we should also have:
dev_warn(ctrl->ctrl.device, "NVME-FC{%d}: starting
error recovery %s\n",
ctrl->cnum, errmsg);
before queueing the ioerr_work.
Sincerely,
Randy Jennings
More information about the Linux-nvme
mailing list