* [PATCH] nvmet: report backend transport errors as path errors
@ 2026-11-13 11:02 Gleb Chesnokov
2026-11-20 17:56 ` Christoph Hellwig
2026-11-20 19:54 ` Keith Busch
0 siblings, 2 replies; 3+ messages in thread
From: Gleb Chesnokov @ 2026-11-13 11:02 UTC (permalink / raw)
To: linux-nvme; +Cc: hch, sagi, kch, kbusch, linux-kernel
The block backend maps BLK_STS_TRANSPORT to NVME_SC_INTERNAL with DNR
set. This discards the backend's transport error classification. A Linux
native multipath host completes the request before considering path
failover, even if another controller can still access the namespace.
Map BLK_STS_TRANSPORT to NVME_SC_INTERNAL_PATH_ERROR without DNR instead.
The transport failure is behind the controller, so report an internal
path error rather than a host path error. Associate the error log entry
with the namespace, as for the existing access-denied status.
This allows otherwise retryable native multipath requests to reach path
error handling.
Signed-off-by: Gleb Chesnokov <gleb.chesnokov@scst.dev>
---
OpenAI Codex assisted with the code analysis, patch and changelog.
drivers/nvme/target/io-cmd-bdev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/nvme/target/io-cmd-bdev.c b/drivers/nvme/target/io-cmd-bdev.c
index 72618dced191..da640b8e8241 100644
--- a/drivers/nvme/target/io-cmd-bdev.c
+++ b/drivers/nvme/target/io-cmd-bdev.c
@@ -167,6 +167,10 @@ u16 blk_to_nvme_status(struct nvmet_req *req, blk_status_t blk_sts)
status = NVME_SC_ACCESS_DENIED;
req->error_loc = offsetof(struct nvme_rw_command, nsid);
break;
+ case BLK_STS_TRANSPORT:
+ status = NVME_SC_INTERNAL_PATH_ERROR;
+ req->error_loc = offsetof(struct nvme_rw_command, nsid);
+ break;
case BLK_STS_IOERR:
default:
status = NVME_SC_INTERNAL | NVME_STATUS_DNR;
base-commit: 7e1392a42ea288d70a266f6553fe06f57f8647ea
--
2.56.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nvmet: report backend transport errors as path errors
2026-11-13 11:02 [PATCH] nvmet: report backend transport errors as path errors Gleb Chesnokov
@ 2026-11-20 17:56 ` Christoph Hellwig
2026-11-20 19:54 ` Keith Busch
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2026-11-20 17:56 UTC (permalink / raw)
To: Gleb Chesnokov; +Cc: linux-nvme, sagi, kch, kbusch, linux-kernel
On Fri, Nov 13, 2026 at 02:02:47PM +0300, Gleb Chesnokov wrote:
> The block backend maps BLK_STS_TRANSPORT to NVME_SC_INTERNAL with DNR
> set. This discards the backend's transport error classification. A Linux
> native multipath host completes the request before considering path
> failover, even if another controller can still access the namespace.
>
> Map BLK_STS_TRANSPORT to NVME_SC_INTERNAL_PATH_ERROR without DNR instead.
> The transport failure is behind the controller, so report an internal
> path error rather than a host path error. Associate the error log entry
> with the namespace, as for the existing access-denied status.
>
> This allows otherwise retryable native multipath requests to reach path
> error handling.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvmet: report backend transport errors as path errors
2026-11-13 11:02 [PATCH] nvmet: report backend transport errors as path errors Gleb Chesnokov
2026-11-20 17:56 ` Christoph Hellwig
@ 2026-11-20 19:54 ` Keith Busch
1 sibling, 0 replies; 3+ messages in thread
From: Keith Busch @ 2026-11-20 19:54 UTC (permalink / raw)
To: linux-nvme, Gleb Chesnokov; +Cc: hch, sagi, kch, linux-kernel
On Fri, 13 Nov 2026 14:02:47 +0300, Gleb Chesnokov wrote:
> The block backend maps BLK_STS_TRANSPORT to NVME_SC_INTERNAL with DNR
> set. This discards the backend's transport error classification. A Linux
> native multipath host completes the request before considering path
> failover, even if another controller can still access the namespace.
>
> Map BLK_STS_TRANSPORT to NVME_SC_INTERNAL_PATH_ERROR without DNR instead.
> The transport failure is behind the controller, so report an internal
> path error rather than a host path error. Associate the error log entry
> with the namespace, as for the existing access-denied status.
>
> [...]
Thanks, applied to nvme-7.5.
[1/1] nvmet: report backend transport errors as path errors
commit: 3b90e37012c0c5297ccbd7b531287b943c818bba
--
Keith Busch <kbusch@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-20 19:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 11:02 [PATCH] nvmet: report backend transport errors as path errors Gleb Chesnokov
2026-11-20 17:56 ` Christoph Hellwig
2026-11-20 19:54 ` Keith Busch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox