mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Matias Bjørling" <mb@lightnvm.io>
To: unlisted-recipients:; (no To-header on input)
Cc: "Javier González" <javier@javigon.com>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Javier González" <javier@cnexlabs.com>,
	"Keith Busch" <keith.busch@intel.com>,
	"Christoph Hellwig" <hch@infradead.org>,
	"Sagi Grimberg" <sagi@grimberg.me>
Subject: Re: [PATCH 08/12] lightnvm: implement get log report chunk helpers
Date: Wed, 21 Mar 2018 11:06:05 +0100	[thread overview]
Message-ID: <8a0a3bad-26a4-ca2f-4bd8-5c71858f6d00@lightnvm.io> (raw)
In-Reply-To: <1520004080-27760-9-git-send-email-javier@cnexlabs.com>

On 03/02/2018 04:21 PM, Javier González wrote:
> The 2.0 spec provides a report chunk log page that can be retrieved
> using the stangard nvme get log page. This replaces the dedicated
> get/put bad block table in 1.2.
> 
> This patch implements the helper functions to allow targets retrieve the
> chunk metadata using get log page. It makes nvme_get_log_ext available
> outside of nvme core so that we can use it form lightnvm.
> 
> Signed-off-by: Javier González <javier@cnexlabs.com>
> ---
>   drivers/lightnvm/core.c      | 11 +++++++
>   drivers/nvme/host/core.c     |  6 ++--
>   drivers/nvme/host/lightnvm.c | 74 ++++++++++++++++++++++++++++++++++++++++++++
>   drivers/nvme/host/nvme.h     |  3 ++
>   include/linux/lightnvm.h     | 24 ++++++++++++++
>   5 files changed, 115 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 2e9e9f973a75..af642ce6ba69 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -2127,9 +2127,9 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
>   	return ret;
>   }
>   
> -static int nvme_get_log_ext(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
> -			    u8 log_page, void *log,
> -			    size_t size, size_t offset)
> +int nvme_get_log_ext(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
> +		     u8 log_page, void *log,
> +		     size_t size, size_t offset)
>   {
>   	struct nvme_command c = { };
>   	unsigned long dwlen = size / 4 - 1;
> diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
> index 08f0f6b5bc06..ffd64a83c8c3 100644
> --- a/drivers/nvme/host/lightnvm.c
> +++ b/drivers/nvme/host/lightnvm.c
> @@ -35,6 +35,10 @@ enum nvme_nvm_admin_opcode {
>   	nvme_nvm_admin_set_bb_tbl	= 0xf1,
>   };
>   

<snip>

>   
> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> index 1ca08f4993ba..505f797f8c6c 100644
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -396,6 +396,9 @@ int nvme_reset_ctrl(struct nvme_ctrl *ctrl);
>   int nvme_delete_ctrl(struct nvme_ctrl *ctrl);
>   int nvme_delete_ctrl_sync(struct nvme_ctrl *ctrl);
>   
> +int nvme_get_log_ext(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
> +		     u8 log_page, void *log, size_t size, size_t offset);
> +
>   extern const struct attribute_group nvme_ns_id_attr_group;
>   extern const struct block_device_operations nvme_ns_head_ops;
>   


Keith, Christoph, Sagi, Is it okay that these two changes that exposes 
the nvme_get_log_ext fn are carried through Jens' tree after the nvme 
tree for 4.17 has been pulled?

  reply	other threads:[~2018-03-21 10:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02 15:21 [PATCH V5 00/12] lightnvm: pblk: implement 2.0 support Javier González
2018-03-02 15:21 ` [PATCH 01/12] lightnvm: simplify geometry structure Javier González
2018-03-05 13:07   ` Matias Bjørling
2018-03-05 13:30     ` Javier González
2018-03-02 15:21 ` [PATCH 02/12] lightnvm: add minor version to generic geometry Javier González
2018-03-02 15:21 ` [PATCH 03/12] lightnvm: add shorten OCSSD version in geo Javier González
2018-03-02 15:21 ` [PATCH 04/12] lightnvm: complete geo structure with maxoc* Javier González
2018-03-02 15:21 ` [PATCH 05/12] lightnvm: normalize geometry nomenclature Javier González
2018-03-02 15:21 ` [PATCH 06/12] lightnvm: add support for 2.0 address format Javier González
2018-03-02 15:21 ` [PATCH 07/12] lightnvm: make address conversions depend on generic device Javier González
2018-03-02 15:21 ` [PATCH 08/12] lightnvm: implement get log report chunk helpers Javier González
2018-03-21 10:06   ` Matias Bjørling [this message]
2018-03-21 14:36     ` Keith Busch
2018-03-21 19:27       ` Matias Bjørling
2018-03-21 20:49         ` Javier Gonzalez
2018-03-02 15:21 ` [PATCH 09/12] lightnvm: pblk: check for supported version Javier González
2018-03-02 15:21 ` [PATCH 10/12] lightnvm: pblk: rename ppaf* to addrf* Javier González
2018-03-02 15:21 ` [PATCH 11/12] lightnvm: pblk: implement get log report chunk Javier González
2018-03-02 15:21 ` [PATCH 12/12] lightnvm: pblk: implement 2.0 support Javier González

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=8a0a3bad-26a4-ca2f-4bd8-5c71858f6d00@lightnvm.io \
    --to=mb@lightnvm.io \
    --cc=hch@infradead.org \
    --cc=javier@cnexlabs.com \
    --cc=javier@javigon.com \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®