From: Keith Busch <kbusch@meta.com>
To: <linux-nvme@lists.infradead.org>
Cc: <hch@lst.de>, <sagi@grimberg.me>, <chaitanyak@nvidia.com>,
<joshi.k@samsung.com>, <axboe@kernel.dk>,
Keith Busch <kbusch@kernel.org>,
Alan Adamson <alan.adamson@oracle.com>,
Daniel Wagner <dwagner@suse.de>
Subject: [PATCHv3] nvme: quiet user passthrough command errors
Date: Fri, 28 Oct 2022 07:44:35 -0700 [thread overview]
Message-ID: <20221028144435.1613982-1-kbusch@meta.com> (raw)
From: Keith Busch <kbusch@kernel.org>
The driver is spamming the kernel logs for entirely harmless errors from
user space submitting unsupported commands. Just silence the errors.
The application has direct access to command status, so there's no need
to log these.
And since every passthrough command now uses the quiet flag, move the
setting to the common initializer.
Cc: Alan Adamson <alan.adamson@oracle.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
v2->v3:
Removed the last open-coded RQF_QUIET flag users since the setting is
redundant with this generic change.
drivers/nvme/host/core.c | 4 +---
drivers/nvme/host/pci.c | 2 --
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 686c55cb5d1a..543782dcfba9 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -657,7 +657,7 @@ static inline void nvme_clear_nvme_request(struct request *req)
nvme_req(req)->status = 0;
nvme_req(req)->retries = 0;
nvme_req(req)->flags = 0;
- req->rq_flags |= RQF_DONTPREP;
+ req->rq_flags |= RQF_DONTPREP | RQF_QUIET;
}
/* initialize a passthrough request */
@@ -1037,7 +1037,6 @@ 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;
@@ -1226,7 +1225,6 @@ static void nvme_keep_alive_work(struct work_struct *work)
rq->timeout = ctrl->kato * HZ;
rq->end_io = nvme_keep_alive_end_io;
rq->end_io_data = ctrl;
- rq->rq_flags |= RQF_QUIET;
blk_execute_rq_nowait(rq, false);
}
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 72b5c1addbff..8cd92283cbfc 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1436,7 +1436,6 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req)
abort_req->end_io = abort_endio;
abort_req->end_io_data = NULL;
- abort_req->rq_flags |= RQF_QUIET;
blk_execute_rq_nowait(abort_req, false);
/*
@@ -2485,7 +2484,6 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode)
req->end_io_data = nvmeq;
init_completion(&nvmeq->delete_done);
- req->rq_flags |= RQF_QUIET;
blk_execute_rq_nowait(req, false);
return 0;
}
--
2.30.2
next reply other threads:[~2022-10-28 14:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 14:44 Keith Busch [this message]
2022-10-28 16:49 ` [PATCHv3] nvme: quiet user passthrough command errors Chaitanya Kulkarni
2022-10-28 16:51 ` Jens Axboe
2022-10-28 19:08 ` Alan Adamson
2022-10-28 20:07 ` Keith Busch
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=20221028144435.1613982-1-kbusch@meta.com \
--to=kbusch@meta.com \
--cc=alan.adamson@oracle.com \
--cc=axboe@kernel.dk \
--cc=chaitanyak@nvidia.com \
--cc=dwagner@suse.de \
--cc=hch@lst.de \
--cc=joshi.k@samsung.com \
--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