All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-core: mark passthru requests RQF_QUIET flag
@ 2022-04-06 16:41 Chaitanya Kulkarni
  2022-04-06 16:52 ` Keith Busch
  0 siblings, 1 reply; 23+ messages in thread
From: Chaitanya Kulkarni @ 2022-04-06 16:41 UTC (permalink / raw)
  To: linux-nvme; +Cc: hch, kbusch, alan.adamson, Chaitanya Kulkarni

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



^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-04-11 21:39 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 16:41 [PATCH] nvme-core: mark passthru requests RQF_QUIET flag Chaitanya Kulkarni
2022-04-06 16:52 ` 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

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.