public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <kch@nvidia.com>
To: <linux-nvme@lists.infradead.org>
Cc: <hch@lst.de>, <sagi@grimberg.me>, <kbusch@kernel.org>,
	Chaitanya Kulkarni <kch@nvidia.com>
Subject: [PATCH 3/3] nvme-core: mark internal passthru req REQ_QUIET
Date: Sun, 10 Apr 2022 20:12:49 -0700	[thread overview]
Message-ID: <20220411031249.5158-4-kch@nvidia.com> (raw)
In-Reply-To: <20220411031249.5158-1-kch@nvidia.com>

Mark internal passthru requests quiet in the submission path with
RQF_QUIET flag added in the __nvme_submit_sync_cmd(). In the completion
path, if nvme request is resulted in the error and request is marked
RQF_QUIET then don't log the error with nvme_error_log().

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
 drivers/nvme/host/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 449378a96a9f..12302be83a6c 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -370,7 +370,7 @@ 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 && !(req->rq_flags & RQF_QUIET)))
 		nvme_log_error(req);
 	nvme_end_req_zoned(req);
 	nvme_trace_bio_complete(req);
@@ -1100,6 +1100,7 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
 			goto out;
 	}
 
+	req->rq_flags |= RQF_QUIET;
 	ret = nvme_execute_rq(req, at_head);
 	if (result && ret >= 0)
 		*result = nvme_req(req)->result;
-- 
2.29.0



  parent reply	other threads:[~2022-04-11  3:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  3:12 [PATCH 0/3] nvme: fix internal passthru error messages Chaitanya Kulkarni
2022-04-11  3:12 ` [PATCH 1/3] nvmet: handle admin default command set identifier Chaitanya Kulkarni
2022-04-11  6:18   ` Christoph Hellwig
2022-05-10  6:33     ` Christoph Hellwig
2022-04-11  3:12 ` [PATCH 2/3] nvme-core: don't check non-mdts for disc ctrl Chaitanya Kulkarni
2022-04-11  6:13   ` Christoph Hellwig
2022-04-11 10:27     ` Sagi Grimberg
2022-04-11 10:49       ` Chaitanya Kulkarni
2022-04-11 12:09         ` Chaitanya Kulkarni
2022-04-11 12:12           ` Christoph Hellwig
2022-04-11 12:40             ` Chaitanya Kulkarni
2022-04-11 14:14               ` Keith Busch
2022-04-11 20:44                 ` Chaitanya Kulkarni
2022-04-11 23:51                   ` Keith Busch
2022-05-10  6:21                   ` Christoph Hellwig
2022-05-11  7:19                     ` Chaitanya Kulkarni
2022-04-11  3:12 ` Chaitanya Kulkarni [this message]
2022-04-11  6:12   ` [PATCH 3/3] nvme-core: mark internal passthru req REQ_QUIET Christoph Hellwig
2022-04-11 10:48     ` Chaitanya Kulkarni
2022-04-11 10:28   ` Sagi Grimberg
2022-04-11 10:49     ` Chaitanya Kulkarni
2022-04-13 12:07   ` Yi Zhang
2022-04-15  5:59     ` Chaitanya Kulkarni
2022-04-13 16:48   ` Jonathan Derrick
2022-04-13 16:49   ` Jonathan Derrick
2022-04-13 16:52     ` Christoph Hellwig
2022-04-13 16:57       ` Jonathan Derrick
2022-04-13 17:09         ` Keith Busch
2022-04-13 17:11           ` Jonathan Derrick
2022-04-15  6:01           ` Chaitanya Kulkarni
2022-04-13 16:58   ` Keith Busch
2022-04-13 18:42   ` Alan Adamson

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=20220411031249.5158-4-kch@nvidia.com \
    --to=kch@nvidia.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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