Should NVME_SC_INVALID_NS be translated to BLK_STS_IOERR instead of BLK_STS_NOTSUPP so that multipath(both native and dm) can failover on the failure?

Sagi Grimberg sagi at grimberg.me
Tue Jan 2 04:46:07 PST 2024


> in function nvmet_subsys_nsid_exists() added in the patch, remove the 
> '\n' from line `if (sprintf(name, "%u\n", nsid) <= 0)`, the patch works 
> exactly as what I expect, fio keeps running and multipath does failover.

OK, can you please check nvme native mpath as well?

What I suspect will happen is that the host will be unable to
failover because it will re-read the ana log page and not find
anything wrong with the actual path, hence will just retry on
the same namespace.

That may be transient because there should be an AEN on the way
to the host to remove the (path'd) namespace altogether.

The status reporting is not consistent with the actual ana state
hence the approach has a semantic problem. perhaps we want another
error that is a path status, but not semantically an ana status.

Can you try returning NVME_SC_CTRL_PATH_ERROR instead of
NVME_SC_ANA_PERSISTENT_LOSS ?



More information about the Linux-nvme mailing list