From: 전민식 <hmi.jeon@samsung.com>
To: Justin Tee <justintee8345@gmail.com>,
"kbusch@kernel.org" <kbusch@kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "sven@kernel.org" <sven@kernel.org>,
"j@jannau.net" <j@jannau.net>, "neal@gompa.dev" <neal@gompa.dev>,
"hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>,
"justin.tee@broadcom.com" <justin.tee@broadcom.com>,
"nareshgottumukkala83@gmail.com" <nareshgottumukkala83@gmail.com>,
"paul.ely@broadcom.com" <paul.ely@broadcom.com>,
"kch@nvidia.com" <kch@nvidia.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"asahi@lists.linux.dev" <asahi@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH v3] nvme: Add nvme_setup_cmd to host_path_error
Date: Wed, 25 Mar 2026 15:33:33 +0900 [thread overview]
Message-ID: <20260325063333epcms2p60954532c1b65a1665bad6dcdcfd7d62c@epcms2p6> (raw)
In-Reply-To: <945a3e98-ee75-453c-ae80-f3c9e3e57e58@gmail.com>
Hi Justin,
After your feedback, I found a simpler approach.
I've modified the patch to add nvme_setup_cmd() inside
host_path_error(). I think this patch won't cause side effect.
Please leave a review. Thank you.
- Before
nvme_complete_rq: \
nvme0: qid=0, cmdid=0, res=0x0, retries=0, flags=0x2, status=0x370
- After
nvme_setup_cmd: \
nvme0: qid=0, cmdid=32777, nsid=0, flags=0x0, meta=0x0, \
cmd=(nvme_admin_identify cns=1, ctrlid=0)
nvme_complete_rq: \
nvme0: qid=0, cmdid=32777, res=0x0, retries=0, flags=0x2, status=0x370
Regards,
Minsik Jeon
From 98af885be8314dc9093983c531fc36b454b78e81 Mon Sep 17 00:00:00 2001
From: Minsik Jeon <hmi.jeon@samsung.com>
Date: Wed, 25 Mar 2026 15:58:20 +0900
Subject: [PATCH v3] nvme: Add nvme_setup_cmd to host_path_error
we were checking host_pathing_error before calling nvme_setup_cmd().
This is caused the command setup to be skipped entirely when a pathing
error occurred, making it impossible to trace the nvme command via
trace_cmd nvme_complete_rq().
As a result, when nvme_complete_rq() logged a completion with cmdid=0,
it was impossible to correlate the completion with the nvme command
request.
This patch add nvme_setup_cmd() to nvme_host_path_error().
- Before
nvme_complete_rq: \
nvme0: qid=0, cmdid=0, res=0x0, retries=0, flags=0x2, status=0x370
- After
nvme_setup_cmd: \
nvme0: qid=0, cmdid=32777, nsid=0, flags=0x0, meta=0x0, \
cmd=(nvme_admin_identify cns=1, ctrlid=0)
nvme_complete_rq: \
nvme0: qid=0, cmdid=32777, res=0x0, retries=0, flags=0x2, status=0x370
Co-authored-by: Beomsoo Kim <beomsooo.kim@samsung.com>
Co-authored-by: Eunsoo Lee <euns212.lee@samsung.com>
Co-authored-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Signed-off-by: Minsik Jeon <hmi.jeon@samsung.com>
---
drivers/nvme/host/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 766e9cc4ffca..378d28b2c971 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -512,6 +512,7 @@ EXPORT_SYMBOL_GPL(nvme_complete_batch_req);
blk_status_t nvme_host_path_error(struct request *req)
{
nvme_req(req)->status = NVME_SC_HOST_PATH_ERROR;
+ nvme_setup_cmd(req->q->queuedata, req);
blk_mq_set_request_complete(req);
nvme_complete_rq(req);
return BLK_STS_OK;
--
2.52.0
next prev parent reply other threads:[~2026-03-25 6:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260320052101epcms2p42ae135da60b36685e9b7fca6849b57a6@epcms2p4>
2026-03-20 5:21 ` [PATCH] nvme: Move nvme_setup_cmd before hot_pathing 전민식
2026-03-20 13:43 ` Kanchan Joshi
2026-03-22 7:16 ` kernel test robot
2026-03-22 8:22 ` kernel test robot
2026-03-22 12:09 ` kernel test robot
[not found] ` <CGME20260320052101epcms2p42ae135da60b36685e9b7fca6849b57a6@epcms2p3>
2026-03-23 1:04 ` [PATCH v2] " 전민식
2026-03-24 23:55 ` [PATCH] " Justin Tee
[not found] ` <CGME20260320052101epcms2p42ae135da60b36685e9b7fca6849b57a6@epcms2p6>
2026-03-25 6:33 ` 전민식 [this message]
2026-03-25 18:37 ` [PATCH v3] nvme: Add nvme_setup_cmd to host_path_error Justin Tee
2026-03-25 19:03 ` Keith Busch
[not found] ` <CGME20260320052101epcms2p42ae135da60b36685e9b7fca6849b57a6@epcms2p1>
2026-03-26 1:44 ` [PATCH v4] nvme: Skip trace complete_rq on host path error 전민식
2026-03-26 6:14 ` hch
[not found] ` <CGME20260320052101epcms2p42ae135da60b36685e9b7fca6849b57a6@epcms2p5>
2026-03-26 6:51 ` [PATCH v5] " 전민식
2026-03-26 14:20 ` hch
2026-03-26 14:28 ` Keith Busch
2026-03-26 14:31 ` hch
2026-03-26 14:43 ` Keith Busch
2026-03-27 6:19 ` 전민식
2026-03-27 6:37 ` 전민식
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260325063333epcms2p60954532c1b65a1665bad6dcdcfd7d62c@epcms2p6 \
--to=hmi.jeon@samsung.com \
--cc=asahi@lists.linux.dev \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=j@jannau.net \
--cc=justin.tee@broadcom.com \
--cc=justintee8345@gmail.com \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=nareshgottumukkala83@gmail.com \
--cc=neal@gompa.dev \
--cc=paul.ely@broadcom.com \
--cc=sagi@grimberg.me \
--cc=sven@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®