[RFC PATCH 08/14] nvme: Implement cross-controller reset recovery
Randy Jennings
randyj at purestorage.com
Thu Dec 18 17:21:36 PST 2025
On Tue, Nov 25, 2025 at 6:13 PM Mohamed Khalfella
<mkhalfella at purestorage.com> wrote:
>
> A host that has more than one path connecting to an nvme subsystem
> typically has an nvme controller associated with every path. This is
> mostly applicable to nvmeof. If one path goes down, inflight IOs on that
> path should not be retried immediately on another path because this
> could lead to data corruption as described in TP4129. TP8028 defines
> cross-controller reset mechanism that can be used by host to terminate
> IOs on the failed path using one of the remaining healthy paths. Only
> after IOs are terminated, or long enough time passes as defined by
> TP4129, inflight IOs should be retried on another path. Implement core
> cross-controller reset shared logic to be used by the transports.
>
> Signed-off-by: Mohamed Khalfella <mkhalfella at purestorage.com>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> +unsigned long nvme_recover_ctrl(struct nvme_ctrl *ictrl)
> + now = jiffies;
> + deadline = now + msecs_to_jiffies(timeout);
> + while (time_before(now, deadline)) {
> + now = jiffies;
> + }
I would use a for-loop to keep the advancing statement close to the condition.
Reviewed-by: Randy Jennings <randyj at purestorage.com>
More information about the Linux-nvme
mailing list