[PATCH] nvme: quiet user passthrough command errors
Chaitanya Kulkarni
chaitanyak at nvidia.com
Thu Oct 27 09:40:19 PDT 2022
>
> On Oct 27, 2022, at 8:02 AM, Keith Busch <kbusch at kernel.org> wrote:
>
> On Thu, Oct 27, 2022 at 07:17:48AM -0600, Jens Axboe wrote:
>>> On 10/26/22 11:41 PM, Kanchan Joshi wrote:
>>> 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>
>>
>> Agree, we should do it for this path too.
>
> Okay, that would make 4 places the driver is setting the QUIET flag,
> which is all of the passthrough requests. Instead of doing them
> individually, I'll just move the setting to their common helper:
> nvme_init_command().
>
Yes please.
-ck
More information about the Linux-nvme
mailing list