All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org, Chao Leng <lengchao@huawei.com>
Subject: Re: [PATCH 1/4] nvme: rename and document nvme_end_request
Date: Mon, 17 Aug 2020 10:53:33 -0400	[thread overview]
Message-ID: <20200817145333.GA30005@redhat.com> (raw)
In-Reply-To: <20200817081544.837699-2-hch@lst.de>

On Mon, Aug 17 2020 at  4:15am -0400,
Christoph Hellwig <hch@lst.de> wrote:

> nvme_end_request is a bit misnamed, as it wraps around the
> blk_mq_complete_* API.  It's semantics also are non-trivial, so give it
> a more descriptive name and add a comment explaining the semantics.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
> ---
>  Documentation/fault-injection/nvme-fault-injection.rst | 2 +-
>  drivers/nvme/host/fc.c                                 | 2 +-
>  drivers/nvme/host/nvme.h                               | 8 +++++++-
>  drivers/nvme/host/pci.c                                | 2 +-
>  drivers/nvme/host/rdma.c                               | 2 +-
>  drivers/nvme/host/tcp.c                                | 4 ++--
>  drivers/nvme/target/loop.c                             | 2 +-
>  7 files changed, 14 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/fault-injection/nvme-fault-injection.rst b/Documentation/fault-injection/nvme-fault-injection.rst
> index cdb2e829228e3e..1d4427890d7591 100644
> --- a/Documentation/fault-injection/nvme-fault-injection.rst
> +++ b/Documentation/fault-injection/nvme-fault-injection.rst
> @@ -3,7 +3,7 @@ NVMe Fault Injection
>  Linux's fault injection framework provides a systematic way to support
>  error injection via debugfs in the /sys/kernel/debug directory. When
>  enabled, the default NVME_SC_INVALID_OPCODE with no retry will be
> -injected into the nvme_end_request. Users can change the default status
> +injected into the nvme_try_complete_req. Users can change the default status
>  code and no retry flag via the debugfs. The list of Generic Command
>  Status can be found in include/linux/nvme.h
>  
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index eae43bb444e038..ba4f10144274db 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -2035,7 +2035,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req)
>  	}
>  
>  	__nvme_fc_fcpop_chk_teardowns(ctrl, op, opstate);
> -	if (!nvme_end_request(rq, status, result))
> +	if (!nvme_try_complete_req(rq, status, result))
>  		nvme_fc_complete_rq(rq);
>  
>  check_error:
> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> index ebb8c3ed388554..6d69cc7306d034 100644
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -523,7 +523,13 @@ static inline u32 nvme_bytes_to_numd(size_t len)
>  	return (len >> 2) - 1;
>  }
>  
> -static inline bool nvme_end_request(struct request *req, __le16 status,
> +/*
> + * Fill in the status and result information from the CQE, and then figure
> + * out if we blk-mq will need to use IPI magic to complete the request, and

s/we blk-mq/blk-mq/

Otherwise:

Reviewed-by: Mike Snitzer <snitzer@redhat.com>


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-08-17 14:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17  8:15 nvme completion handling refactor and fix v2 Christoph Hellwig
2020-08-17  8:15 ` [PATCH 1/4] nvme: rename and document nvme_end_request Christoph Hellwig
2020-08-17 14:53   ` Mike Snitzer [this message]
2020-08-17  8:15 ` [PATCH 2/4] nvme: refactor command completion Christoph Hellwig
2020-08-17 15:08   ` Mike Snitzer
2020-08-17 19:28   ` Mike Snitzer
2020-08-18  6:26     ` Christoph Hellwig
2020-08-17  8:15 ` [PATCH 3/4] nvme: just check the status code type in nvme_is_path_error Christoph Hellwig
2020-08-17 15:11   ` Mike Snitzer
2020-08-17 19:31   ` Sagi Grimberg
2020-08-18  6:31     ` Christoph Hellwig
2020-08-17  8:15 ` [PATCH 4/4] nvme: redirect commands on dying queue Christoph Hellwig
2020-08-17 15:23   ` Mike Snitzer
2020-08-18  6:32     ` Christoph Hellwig
2020-08-17 18:10 ` nvme completion handling refactor and fix v2 Sagi Grimberg
2020-08-18  6:33   ` Christoph Hellwig
2020-08-18  7:11 nvme completion handling refactor and fix v3 Christoph Hellwig
2020-08-18  7:11 ` [PATCH 1/4] nvme: rename and document nvme_end_request Christoph Hellwig

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=20200817145333.GA30005@redhat.com \
    --to=snitzer@redhat.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=lengchao@huawei.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.