From: Chaitanya Kulkarni <kch@nvidia.com>
To: <linux-nvme@lists.infradead.org>
Cc: <hch@lst.de>, <kbusch@kernel.org>, <alan.adamson@oracle.com>,
"Chaitanya Kulkarni" <kch@nvidia.com>
Subject: [PATCH] nvme-core: mark passthru requests RQF_QUIET flag
Date: Wed, 6 Apr 2022 09:41:09 -0700 [thread overview]
Message-ID: <20220406164109.30449-1-kch@nvidia.com> (raw)
From: Christoph Hellwig <hch@lst.de>
Since addition of the nvme_log_error() we are getting error message
when running block tests framework due to internal passthru commands :-
[ 612.754938] nvme nvme1: Removing ctrl: NQN "blktests-subsystem-1"
[ 616.361730] run blktests nvme/012 at 2022-04-06 09:26:43
[ 616.382902] loop0: detected capacity change from 0 to 2097152
[ 616.392680] nvmet: adding nsid 1 to subsystem blktests-subsystem-1
[ 616.400913] nvmet: creating nvm controller 1 for subsystem blktests-subsystem-1 for NQN testhostnqn.
[ 616.401001] nvme1: Identify(0x6), Invalid Field in Command (sct 0x0 / sc 0x2) MORE DNR
[ 627.427947] nvmet: adding nsid 1 to subsystem blktests-subsystem-1
[ 627.437084] nvmet: creating nvm controller 1 for subsystem blktests-subsystem-1 for NQN testhostnqn.
[ 627.437161] nvme1: Identify(0x6), Invalid Field in Command (sct 0x0 / sc 0x2) MORE DNR
[ 627.438984] nvme nvme1: creating 48 I/O queues.
[ 627.442620] nvme nvme1: new ctrl: "blktests-subsystem-1"
[ 628.506885] XFS (nvme1n1): Mounting V5 Filesystem
[ 628.516895] XFS (nvme1n1): Ending clean mount
[ 628.519966] xfs filesystem being mounted at /mnt/blktests supports timestamps until 2038 (0x7fffffff)
[ 704.852721] XFS (nvme1n1): Unmounting Filesystem
[ 704.864724] nvme nvme1: Removing ctrl: NQN "blktests-subsystem-1"
This patch adds the passthru request with RQF_QUIET flag and ignores
the error reporting for nvme_log_error() if RQF_QUIET flag is set
when request is failed. With this patch we don't get the above error
message.
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
[kch: make a formal patch & test with blktests]
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/nvme/host/core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index f204c6f78b5b..b913a89c743e 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -370,7 +370,8 @@ static inline void nvme_end_req(struct request *req)
{
blk_status_t status = nvme_error_status(nvme_req(req)->status);
- if (unlikely(nvme_req(req)->status != NVME_SC_SUCCESS))
+ if (unlikely(nvme_req(req)->status != NVME_SC_SUCCESS &&
+ !(req->rq_flags & RQF_QUIET)))
nvme_log_error(req);
nvme_end_req_zoned(req);
nvme_trace_bio_complete(req);
@@ -651,6 +652,7 @@ void nvme_init_request(struct request *req, struct nvme_command *cmd)
cmd->common.flags &= ~NVME_CMD_SGL_ALL;
req->cmd_flags |= REQ_FAILFAST_DRIVER;
+ req->rq_flags |= RQF_QUIET;
if (req->mq_hctx->type == HCTX_TYPE_POLL)
req->cmd_flags |= REQ_POLLED;
nvme_clear_nvme_request(req);
--
2.29.0
next reply other threads:[~2022-04-06 16:41 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 16:41 Chaitanya Kulkarni [this message]
2022-04-06 16:52 ` [PATCH] nvme-core: mark passthru requests RQF_QUIET flag Keith Busch
2022-04-06 17:01 ` Chaitanya Kulkarni
2022-04-06 17:21 ` Keith Busch
2022-04-06 22:06 ` Alan Adamson
2022-04-06 22:16 ` Chaitanya Kulkarni
2022-04-06 23:29 ` Alan Adamson
2022-04-07 19:40 ` Chaitanya Kulkarni
2022-04-07 8:48 ` Christoph Hellwig
2022-04-07 8:51 ` hch
2022-04-07 11:52 ` Sagi Grimberg
2022-04-07 20:10 ` Chaitanya Kulkarni
2022-04-07 20:35 ` Alan Adamson
2022-04-07 21:00 ` Chaitanya Kulkarni
2022-04-07 21:13 ` Alan Adamson
2022-04-08 2:13 ` Chaitanya Kulkarni
2022-04-08 16:24 ` Alan Adamson
2022-04-09 0:10 ` Chaitanya Kulkarni
2022-04-11 18:31 ` Alan Adamson
2022-04-11 19:53 ` Chaitanya Kulkarni
2022-04-11 21:39 ` Alan Adamson
2022-04-07 16:15 ` Alan Adamson
2022-04-06 17:03 ` Chaitanya Kulkarni
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=20220406164109.30449-1-kch@nvidia.com \
--to=kch@nvidia.com \
--cc=alan.adamson@oracle.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.