[PATCH 3/3] nvme-core: mark internal passthru req REQ_QUIET

Yi Zhang yi.zhang at redhat.com
Wed Apr 13 05:07:36 PDT 2022


Verified the issue with this patch I reported here:
https://lore.kernel.org/linux-nvme/CAHj4cs_iC+FE8ZAXXZPeia1V3ZX7zRbeASdOP_8c7DLiFozNfA@mail.gmail.com/

Tested-by: Yi Zhang <yi.zhang at redhat.com>

On Mon, Apr 11, 2022 at 11:21 AM Chaitanya Kulkarni <kch at nvidia.com> wrote:
>
> Mark internal passthru requests quiet in the submission path with
> RQF_QUIET flag added in the __nvme_submit_sync_cmd(). In the completion
> path, if nvme request is resulted in the error and request is marked
> RQF_QUIET then don't log the error with nvme_error_log().
>
> Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
> ---
>  drivers/nvme/host/core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 449378a96a9f..12302be83a6c 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -370,7 +370,7 @@ 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 && !(req->rq_flags & RQF_QUIET)))
>                 nvme_log_error(req);
>         nvme_end_req_zoned(req);
>         nvme_trace_bio_complete(req);
> @@ -1100,6 +1100,7 @@ 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;
> --
> 2.29.0
>
>


-- 
Best Regards,
  Yi Zhang




More information about the Linux-nvme mailing list