From: Johannes Thumshirn <jthumshirn@suse.de>
To: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Keith Busch <keith.busch@intel.com>
Cc: Hannes Reinecke <hare@suse.de>,
maxg@mellanox.com,
Linux NVMe Mailinglist <linux-nvme@lists.infradead.org>,
Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
Johannes Thumshirn <jthumshirn@suse.de>
Subject: [PATCH v3 0/8] Implement NVMe Namespace Descriptor Identification
Date: Fri, 2 Jun 2017 11:45:28 +0200 [thread overview]
Message-ID: <20170602094536.25775-1-jthumshirn@suse.de> (raw)
This patchset implemets NVMe Namespace Descriptor Identification as of
NVMe 1.3. The Namespace Descriptor Identification allows a NVMe host
to query several Namespace Identification mechanisms, such as EUI-64,
NGUID and UUID from the target. If more than one value is set by the
target, it can transmit all set values to the host.
The Namespace Identification Descriptor list is the only way a target
can identify itself via the newly introduced UUID to the host (instead
of the EUI-64 or NGUID).
Both the Host and Target side are implemented. In order to get the
Linux Host to send the Linux target implementation a Namespace
Descriptor Identification command, you have to change the target's
announced version code to at least 1.3.
Unfortunately the host side already did have a sysfs attribute called
'uuid' which represented the NGUID, so precautions have been taken to
not break any existing userspace.
While I was already touching the relevant code paths, I decided to
also include the EUI-64 in the 'Identify Namespace' command response.
The code is tested using the nvme-loop loopback target and cut against
the nvme tree's nvme-4.12 branch.
A patch for nvmetcli will follow shortly.
Changes to v2:
* Added Max's Reviewed-by
* Make series bisectable
Changes to v1:
* Added Reviewed-by tags from Christoph and Hannes for unchanged patches
* Added patch introducing new structs at the beginning (Christoph)
* Dropped SZ_4K patch
* Got rid of dynamic memory allocation on the target side (Christoph)
* Reworked host side parser (Christoph)
* Check length inside type check in the host parser (Max)
Changes to v0:
* Fixed wrong size of 4069 and replaced it with SZ_4K (Max)
* Add constants for UUID, NGUID and EUI-64 length (Max)
* Drop EUI-64 Support on target side (Christoph)
* Use uuid_be instead of u8[] (Christoph)
* Add ability to override target's version (Hannes)
* Change hard coded magic 4096 and 0x1000 to SZ_4k in drivers/nvme/*
Johannes Thumshirn (8):
nvme: introduce NVMe Namespace Identification Descriptor structures
nvme: rename uuid to nguid in nvme_ns
nvmet: implement namespace identify descriptor list
nvmet: add uuid field to nvme_ns and populate via configfs
nvme: get list of namespace descriptors
nvme: provide UUID value to userspace
nvmet: allow overriding the NVMe VS via configfs
nvmet: use NVME_IDENTIFY_DATA_SIZE
drivers/nvme/host/core.c | 118 ++++++++++++++++++++++++++++++++++++++--
drivers/nvme/host/nvme.h | 1 +
drivers/nvme/target/admin-cmd.c | 57 ++++++++++++++++++-
drivers/nvme/target/configfs.c | 65 ++++++++++++++++++++++
drivers/nvme/target/core.c | 2 +-
drivers/nvme/target/discovery.c | 2 +-
drivers/nvme/target/nvmet.h | 1 +
include/linux/nvme.h | 23 ++++++++
8 files changed, 261 insertions(+), 8 deletions(-)
--
2.12.0
next reply other threads:[~2017-06-02 9:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-02 9:45 Johannes Thumshirn [this message]
2017-06-02 9:45 ` [PATCH v3 1/8] nvme: introduce NVMe Namespace Identification Descriptor structures Johannes Thumshirn
2017-06-02 9:45 ` [PATCH v3 2/8] nvme: rename uuid to nguid in nvme_ns Johannes Thumshirn
2017-06-02 9:45 ` [PATCH v3 3/8] nvmet: implement namespace identify descriptor list Johannes Thumshirn
2017-06-02 13:46 ` Sagi Grimberg
2017-06-02 13:54 ` Johannes Thumshirn
2017-06-03 5:18 ` Christoph Hellwig
2017-06-03 8:03 ` Sagi Grimberg
2017-06-05 5:31 ` Christoph Hellwig
2017-06-06 7:17 ` Johannes Thumshirn
2017-06-06 7:19 ` Christoph Hellwig
2017-06-06 7:20 ` Johannes Thumshirn
2017-06-02 9:45 ` [PATCH v3 4/8] nvmet: add uuid field to nvme_ns and populate via configfs Johannes Thumshirn
2017-06-02 9:45 ` [PATCH v3 5/8] nvme: get list of namespace descriptors Johannes Thumshirn
2017-06-02 9:45 ` [PATCH v3 6/8] nvme: provide UUID value to userspace Johannes Thumshirn
2017-06-02 9:45 ` [PATCH v3 7/8] nvmet: allow overriding the NVMe VS via configfs Johannes Thumshirn
2017-06-02 9:45 ` [PATCH v3 8/8] nvmet: use NVME_IDENTIFY_DATA_SIZE Johannes Thumshirn
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=20170602094536.25775-1-jthumshirn@suse.de \
--to=jthumshirn@suse.de \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=maxg@mellanox.com \
--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®