Re: [PATCH v2 13/14] nvme-fc: Use CCR to recover controller that hits an error

James Smart
2026-02-10T22:12:27Z

On 1/30/2026 2:34 PM, Mohamed Khalfella wrote:
> +static void nvme_fc_fenced_work(struct work_struct *work)
> +{
> + struct nvme_fc_ctrl *fc_ctrl = container_of(to_delayed_work(work),
> + struct nvme_fc_ctrl, fenced_work);
> + struct nvme_ctrl *ctrl = &fc_ctrl->ctrl;
> +
> + 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);
> +}

I'm not a fan of 1, maybe 2, state changes that may silently fail. Some
trace message would be worthwhile to state fencing cancelled/ended.

-- james