[PATCH] nvme: quiet user passthrough command errors

Keith Busch kbusch at meta.com
Wed Oct 26 10:07:15 PDT 2022


From: Keith Busch <kbusch at kernel.org>

The driver is spamming the kernel logs for entirely harmless errors from
user space submitting unsupported commmands. Just silence the errors.
The application has direct access to command status, so there's no need
to log these.

Cc: Daniel Wagner <dwagner at suse.de>
Cc: Alan Adamson <alan.adamson at oracle.com>
Signed-off-by: Keith Busch <kbusch at kernel.org>
---
 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 686c55cb5d1a..da874172a31d 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1156,6 +1156,7 @@ int nvme_execute_passthru_rq(struct request *rq, u32 *effects)
 	struct nvme_ns *ns = rq->q->queuedata;
 
 	*effects = nvme_passthru_start(ctrl, ns, cmd->common.opcode);
+	rq->rq_flags |= RQF_QUIET;
 	return nvme_execute_rq(rq, false);
 }
 EXPORT_SYMBOL_NS_GPL(nvme_execute_passthru_rq, NVME_TARGET_PASSTHRU);
-- 
2.30.2




More information about the Linux-nvme mailing list