Re: [PATCH v4 1/2] nvme-multipath: fix path state evaluation for failfast and ANA

From: Nilay Shroff

Date: Fri Oct 02 2026 - 07:54:13 EST


On 10/1/26 3:18 PM, Krishna Iyer wrote:
nvme_available_path() has two problems that keep I/O queued when it
should be failed:

1. When fast_io_fail_tmo expires, NVME_CTRL_FAILFAST_EXPIRED is set and
the path is skipped, but the function still falls through to
nvme_mpath_queue_if_no_path(). If delayed_removal_secs is configured
the I/O is requeued indefinitely, defeating fast_io_fail_tmo. Only
fall through to queue_if_no_path when there really are no paths;
if a path exists but its failfast timer has expired, fail instead.

2. A LIVE controller counts as a usable path regardless of the namespace
ANA state. A path whose ANA state is inaccessible or persistent-loss
cannot serve I/O, so it should not count as available. ANA change is
transient and bounded by ANATT, so keep queueing while it resolves.

Also kick the requeue work from nvme_update_ns_ana_state() when a path
does not transition to live, so parked I/O is re-evaluated when an ANA
transition leaves the namespace inaccessible.

Move nvme_state_is_live() above nvme_available_path() so it can be used
there.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Krishna Iyer<kiyer@xxxxxxxxx>

Looks good to me.
Reviewed-by: Nilay Shroff <nilay@xxxxxxxxxxxxx>