All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Derrick <jonathan.derrick@linux.dev>
To: Chaitanya Kulkarni <kch@nvidia.com>, linux-nvme@lists.infradead.org
Cc: hch@lst.de, sagi@grimberg.me, kbusch@kernel.org
Subject: Re: [PATCH 3/3] nvme-core: mark internal passthru req REQ_QUIET
Date: Wed, 13 Apr 2022 10:49:33 -0600	[thread overview]
Message-ID: <cf4534ec-c8d1-c020-2079-5636177ca1b5@linux.dev> (raw)
In-Reply-To: <20220411031249.5158-4-kch@nvidia.com>

Hi,

On 4/10/2022 9:12 PM, Chaitanya Kulkarni 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@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;
Any reason to not make it a part of flags in the argument list and let 
the block layer build the req with it?

eg:
flags |= REQ_QUIET;
if (qid == NVME_QID_ANY)
     req = blk_mq_alloc_request(q, nvme_req_op(cmd), flags);
else
     req = blk_mq_alloc_request_hctx(q, nvme_req_op(cmd), flags,
                     qid ? qid - 1 : 0);

>   	ret = nvme_execute_rq(req, at_head);
>   	if (result && ret >= 0)
>   		*result = nvme_req(req)->result;


  parent reply	other threads:[~2022-04-13 16:49 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  3:12 [PATCH 0/3] nvme: fix internal passthru error messages Chaitanya Kulkarni
2022-04-11  3:12 ` [PATCH 1/3] nvmet: handle admin default command set identifier Chaitanya Kulkarni
2022-04-11  6:18   ` Christoph Hellwig
2022-05-10  6:33     ` Christoph Hellwig
2022-04-11  3:12 ` [PATCH 2/3] nvme-core: don't check non-mdts for disc ctrl Chaitanya Kulkarni
2022-04-11  6:13   ` Christoph Hellwig
2022-04-11 10:27     ` Sagi Grimberg
2022-04-11 10:49       ` Chaitanya Kulkarni
2022-04-11 12:09         ` Chaitanya Kulkarni
2022-04-11 12:12           ` Christoph Hellwig
2022-04-11 12:40             ` Chaitanya Kulkarni
2022-04-11 14:14               ` Keith Busch
2022-04-11 20:44                 ` Chaitanya Kulkarni
2022-04-11 23:51                   ` Keith Busch
2022-05-10  6:21                   ` Christoph Hellwig
2022-05-11  7:19                     ` Chaitanya Kulkarni
2022-04-11  3:12 ` [PATCH 3/3] nvme-core: mark internal passthru req REQ_QUIET Chaitanya Kulkarni
2022-04-11  6:12   ` Christoph Hellwig
2022-04-11 10:48     ` Chaitanya Kulkarni
2022-04-11 10:28   ` Sagi Grimberg
2022-04-11 10:49     ` Chaitanya Kulkarni
2022-04-13 12:07   ` Yi Zhang
2022-04-15  5:59     ` Chaitanya Kulkarni
2022-04-13 16:48   ` Jonathan Derrick
2022-04-13 16:49   ` Jonathan Derrick [this message]
2022-04-13 16:52     ` Christoph Hellwig
2022-04-13 16:57       ` Jonathan Derrick
2022-04-13 17:09         ` Keith Busch
2022-04-13 17:11           ` Jonathan Derrick
2022-04-15  6:01           ` Chaitanya Kulkarni
2022-04-13 16:58   ` Keith Busch
2022-04-13 18:42   ` Alan Adamson

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=cf4534ec-c8d1-c020-2079-5636177ca1b5@linux.dev \
    --to=jonathan.derrick@linux.dev \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.