[PATCH] nvme: quiet user passthrough command errors
Kanchan Joshi
joshi.k at samsung.com
Wed Oct 26 22:41:36 PDT 2022
On Wed, Oct 26, 2022 at 10:07:15AM -0700, Keith Busch wrote:
>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);
> }
Can we do this for uring-passthrough path too? Like below patch -
diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c
index 81f5550b670d..a91cefc38506 100644
--- a/drivers/nvme/host/ioctl.c
+++ b/drivers/nvme/host/ioctl.c
@@ -556,6 +556,7 @@ static int nvme_uring_cmd_io(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
} else {
req->end_io = nvme_uring_cmd_end_io;
}
+ req->rq_flags |= RQF_QUIET;
blk_execute_rq_nowait(req, false);
return -EIOCBQUEUED;
}
Looks good otherwise.
Reviewed-by: Kanchan Joshi <joshi.k at samsung.com>
More information about the Linux-nvme
mailing list