Re: [PATCH v4 3/8] nvmet: implement namespace identify descriptor list

2017-06-06 Thread Johannes Thumshirn
want to add a helper to zero parts of a sglist to > lib/scatterlist.c, but I don't want to burden that on you. I'll have a look. -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5,

Re: [PATCH v3 3/8] nvmet: implement namespace identify descriptor list

2017-06-06 Thread Johannes Thumshirn
o introduce > more users of the old types. Thanks! Sure -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: [PATCH v3 3/8] nvmet: implement namespace identify descriptor list

2017-06-06 Thread Johannes Thumshirn
o introduce > more users of the old types. Thanks! Sure -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: [PATCH v3 3/8] nvmet: implement namespace identify descriptor list

2017-06-06 Thread Johannes Thumshirn
_copy_to_sgl(req, off, id, len); > if (status) > return status; > *off += len; > > return 0; > } > Yep sounds good. Sorry I didn't see this for the v4 submission, I'll include in (the hopefully final) v5. -- Johannes Thumshirn

Re: [PATCH v3 3/8] nvmet: implement namespace identify descriptor list

2017-06-06 Thread Johannes Thumshirn
_copy_to_sgl(req, off, id, len); > if (status) > return status; > *off += len; > > return 0; > } > Yep sounds good. Sorry I didn't see this for the v4 submission, I'll include in (the hopefully final) v5. -- Johannes Thumshirn

[PATCH v4 3/8] nvmet: implement namespace identify descriptor list

2017-06-04 Thread Johannes Thumshirn
o maintain backward compatibiliy with older implementations without Namespace Identify Descriptor list support. Also as the Namespace Identify Descriptor list is the only mandatory feature change between 1.2.1 and 1.3.0 we can bump the advertised version as well. Signed-off-by: Johannes Thumshir

[PATCH v4 8/8] nvmet: use NVME_IDENTIFY_DATA_SIZE

2017-06-04 Thread Johannes Thumshirn
Use NVME_IDENTIFY_DATA_SIZE define instead of hard coding the magic 4096 value. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/admin-cmd.c | 4 ++-- drivers/nvme/target/discovery.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/driver

[PATCH v4 5/8] nvme: get list of namespace descriptors

2017-06-04 Thread Johannes Thumshirn
If a target identifies itself as NVMe 1.3 compliant, try to get the list of Namespace Identification Descriptors and populate the UUID, NGUID and EUI64 fileds in the NVMe namespace structure with these values. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/host/

[PATCH v4 6/8] nvme: provide UUID value to userspace

2017-06-04 Thread Johannes Thumshirn
for the NGUID. For the UUID attribute add a check wheter the namespace has a UUID assigned to it and return this or return the NGUID to maintain backwards compatibility. This should give userspace a chance to catch up. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hell

[PATCH v4 3/8] nvmet: implement namespace identify descriptor list

2017-06-04 Thread Johannes Thumshirn
o maintain backward compatibiliy with older implementations without Namespace Identify Descriptor list support. Also as the Namespace Identify Descriptor list is the only mandatory feature change between 1.2.1 and 1.3.0 we can bump the advertised version as well. Signed-off-by: Johannes Thumshirn --

[PATCH v4 8/8] nvmet: use NVME_IDENTIFY_DATA_SIZE

2017-06-04 Thread Johannes Thumshirn
Use NVME_IDENTIFY_DATA_SIZE define instead of hard coding the magic 4096 value. Signed-off-by: Johannes Thumshirn --- drivers/nvme/target/admin-cmd.c | 4 ++-- drivers/nvme/target/discovery.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/target/admin-cmd.c

[PATCH v4 5/8] nvme: get list of namespace descriptors

2017-06-04 Thread Johannes Thumshirn
If a target identifies itself as NVMe 1.3 compliant, try to get the list of Namespace Identification Descriptors and populate the UUID, NGUID and EUI64 fileds in the NVMe namespace structure with these values. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 87

[PATCH v4 6/8] nvme: provide UUID value to userspace

2017-06-04 Thread Johannes Thumshirn
for the NGUID. For the UUID attribute add a check wheter the namespace has a UUID assigned to it and return this or return the NGUID to maintain backwards compatibility. This should give userspace a chance to catch up. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Hannes

[PATCH v4 2/8] nvme: rename uuid to nguid in nvme_ns

2017-06-04 Thread Johannes Thumshirn
the nguid to sysfs in the uuid sysfs attribute, but this can't be changed anymore without possibly breaking existing userspace. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- driver

[PATCH v4 2/8] nvme: rename uuid to nguid in nvme_ns

2017-06-04 Thread Johannes Thumshirn
the nguid to sysfs in the uuid sysfs attribute, but this can't be changed anymore without possibly breaking existing userspace. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/nvme/host/core.c | 10 +- drivers/nvme/host/nvme.h | 2

[PATCH v4 0/8] Implement NVMe Namespace Descriptor Identification

2017-06-04 Thread Johannes Thumshirn
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

[PATCH v4 0/8] Implement NVMe Namespace Descriptor Identification

2017-06-04 Thread Johannes Thumshirn
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

[PATCH v4 1/8] nvme: introduce NVMe Namespace Identification Descriptor structures

2017-06-04 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Max Gurtovoy <m...@mellanox.com> --- include/linux/nvme.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/linux/nvme.h b/include/linux/nvme.h index b625bacf37ef..afa6ef484e50 100644 -

[PATCH v4 1/8] nvme: introduce NVMe Namespace Identification Descriptor structures

2017-06-04 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy --- include/linux/nvme.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/linux/nvme.h b/include/linux/nvme.h index b625bacf37ef..afa6ef484e50 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h

[PATCH v4 4/8] nvmet: add uuid field to nvme_ns and populate via configfs

2017-06-04 Thread Johannes Thumshirn
Add the UUID field from the NVMe Namespace Identification Descriptor to the nvmet_ns structure and allow it's population via configfs. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/configfs.c | 31 +++ 1 file changed, 31 inse

[PATCH v4 7/8] nvmet: allow overriding the NVMe VS via configfs

2017-06-04 Thread Johannes Thumshirn
Allow overriding the announced NVMe Version of a via configfs. This is particularly helpful when debugging new features for the host or target side without bumping the hard coded version (as the target might not be fully compliant to the announced version yet). Signed-off-by: Johannes Thumshirn

[PATCH v4 4/8] nvmet: add uuid field to nvme_ns and populate via configfs

2017-06-04 Thread Johannes Thumshirn
Add the UUID field from the NVMe Namespace Identification Descriptor to the nvmet_ns structure and allow it's population via configfs. Signed-off-by: Johannes Thumshirn --- drivers/nvme/target/configfs.c | 31 +++ 1 file changed, 31 insertions(+) diff --git

[PATCH v4 7/8] nvmet: allow overriding the NVMe VS via configfs

2017-06-04 Thread Johannes Thumshirn
Allow overriding the announced NVMe Version of a via configfs. This is particularly helpful when debugging new features for the host or target side without bumping the hard coded version (as the target might not be fully compliant to the announced version yet). Signed-off-by: Johannes Thumshirn

Re: [PATCH v3 3/8] nvmet: implement namespace identify descriptor list

2017-06-02 Thread Johannes Thumshirn
uuid; And RFC4122 4.1.2 says MSB first as well. > > Also, it would be useful to generate a random default with uuid_le_gen() > for a better out-of-the-box experience. Yep, sounds reasonable. -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH v3 3/8] nvmet: implement namespace identify descriptor list

2017-06-02 Thread Johannes Thumshirn
uuid; And RFC4122 4.1.2 says MSB first as well. > > Also, it would be useful to generate a random default with uuid_le_gen() > for a better out-of-the-box experience. Yep, sounds reasonable. -- Johannes Thumshirn Storage jthumsh...@suse.de

[PATCH v3 4/8] nvmet: add uuid field to nvme_ns and populate via configfs

2017-06-02 Thread Johannes Thumshirn
Add the UUID field from the NVMe Namespace Identification Descriptor to the nvmet_ns structure and allow it's population via configfs. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/configfs.c | 31 +++ 1 file changed, 31 inse

[PATCH v3 4/8] nvmet: add uuid field to nvme_ns and populate via configfs

2017-06-02 Thread Johannes Thumshirn
Add the UUID field from the NVMe Namespace Identification Descriptor to the nvmet_ns structure and allow it's population via configfs. Signed-off-by: Johannes Thumshirn --- drivers/nvme/target/configfs.c | 31 +++ 1 file changed, 31 insertions(+) diff --git

[PATCH v3 3/8] nvmet: implement namespace identify descriptor list

2017-06-02 Thread Johannes Thumshirn
o maintain backward compatibiliy with older implementations without Namespace Identify Descriptor list support. Also as the Namespace Identify Descriptor list is the only mandatory feature change between 1.2.1 and 1.3.0 we can bump the advertised version as well. Signed-off-by: Johannes Thumshir

[PATCH v3 0/8] Implement NVMe Namespace Descriptor Identification

2017-06-02 Thread Johannes Thumshirn
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

[PATCH v3 3/8] nvmet: implement namespace identify descriptor list

2017-06-02 Thread Johannes Thumshirn
o maintain backward compatibiliy with older implementations without Namespace Identify Descriptor list support. Also as the Namespace Identify Descriptor list is the only mandatory feature change between 1.2.1 and 1.3.0 we can bump the advertised version as well. Signed-off-by: Johannes Thumshirn --

[PATCH v3 0/8] Implement NVMe Namespace Descriptor Identification

2017-06-02 Thread Johannes Thumshirn
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

[PATCH v3 7/8] nvmet: allow overriding the NVMe VS via configfs

2017-06-02 Thread Johannes Thumshirn
Allow overriding the announced NVMe Version of a via configfs. This is particularly helpful when debugging new features for the host or target side without bumping the hard coded version (as the target might not be fully compliant to the announced version yet). Signed-off-by: Johannes Thumshirn

[PATCH v3 7/8] nvmet: allow overriding the NVMe VS via configfs

2017-06-02 Thread Johannes Thumshirn
Allow overriding the announced NVMe Version of a via configfs. This is particularly helpful when debugging new features for the host or target side without bumping the hard coded version (as the target might not be fully compliant to the announced version yet). Signed-off-by: Johannes Thumshirn

[PATCH v3 6/8] nvme: provide UUID value to userspace

2017-06-02 Thread Johannes Thumshirn
for the NGUID. For the UUID attribute add a check wheter the namespace has a UUID assigned to it and return this or return the NGUID to maintain backwards compatibility. This should give userspace a chance to catch up. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hell

[PATCH v3 6/8] nvme: provide UUID value to userspace

2017-06-02 Thread Johannes Thumshirn
for the NGUID. For the UUID attribute add a check wheter the namespace has a UUID assigned to it and return this or return the NGUID to maintain backwards compatibility. This should give userspace a chance to catch up. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Hannes

[PATCH v3 1/8] nvme: introduce NVMe Namespace Identification Descriptor structures

2017-06-02 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Max Gurtovoy <m...@mellanox.com> --- include/linux/nvme.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/linux/nvme.h b/include/linux/nvme.h index b625bacf37ef..afa6ef484e50 100644 -

[PATCH v3 8/8] nvmet: use NVME_IDENTIFY_DATA_SIZE

2017-06-02 Thread Johannes Thumshirn
Use NVME_IDENTIFY_DATA_SIZE define instead of hard coding the magic 4096 value. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/admin-cmd.c | 4 ++-- drivers/nvme/target/discovery.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/driver

[PATCH v3 5/8] nvme: get list of namespace descriptors

2017-06-02 Thread Johannes Thumshirn
If a target identifies itself as NVMe 1.3 compliant, try to get the list of Namespace Identification Descriptors and populate the UUID, NGUID and EUI64 fileds in the NVMe namespace structure with these values. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/host/

[PATCH v3 1/8] nvme: introduce NVMe Namespace Identification Descriptor structures

2017-06-02 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn Reviewed-by: Max Gurtovoy --- include/linux/nvme.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/linux/nvme.h b/include/linux/nvme.h index b625bacf37ef..afa6ef484e50 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h

[PATCH v3 8/8] nvmet: use NVME_IDENTIFY_DATA_SIZE

2017-06-02 Thread Johannes Thumshirn
Use NVME_IDENTIFY_DATA_SIZE define instead of hard coding the magic 4096 value. Signed-off-by: Johannes Thumshirn --- drivers/nvme/target/admin-cmd.c | 4 ++-- drivers/nvme/target/discovery.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/target/admin-cmd.c

[PATCH v3 5/8] nvme: get list of namespace descriptors

2017-06-02 Thread Johannes Thumshirn
If a target identifies itself as NVMe 1.3 compliant, try to get the list of Namespace Identification Descriptors and populate the UUID, NGUID and EUI64 fileds in the NVMe namespace structure with these values. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 87

[PATCH v3 2/8] nvme: rename uuid to nguid in nvme_ns

2017-06-02 Thread Johannes Thumshirn
the nguid to sysfs in the uuid sysfs attribute, but this can't be changed anymore without possibly breaking existing userspace. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- driver

[PATCH v3 2/8] nvme: rename uuid to nguid in nvme_ns

2017-06-02 Thread Johannes Thumshirn
the nguid to sysfs in the uuid sysfs attribute, but this can't be changed anymore without possibly breaking existing userspace. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/nvme/host/core.c | 10 +- drivers/nvme/host/nvme.h | 2

Re: [PATCH v2 6/8] nvme: provide UUID value to userspace

2017-06-01 Thread Johannes Thumshirn
me hand crafted udev rules anyways). -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [PATCH v2 6/8] nvme: provide UUID value to userspace

2017-06-01 Thread Johannes Thumshirn
me hand crafted udev rules anyways). -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

[PATCH v2 5/8] nvme: get list of namespace descriptors

2017-06-01 Thread Johannes Thumshirn
If a target identifies itself as NVMe 1.3 compliant, try to get the list of Namespace Identification Descriptors and populate the UUID, NGUID and EUI64 fileds in the NVMe namespace structure with these values. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/host/

[PATCH v2 5/8] nvme: get list of namespace descriptors

2017-06-01 Thread Johannes Thumshirn
If a target identifies itself as NVMe 1.3 compliant, try to get the list of Namespace Identification Descriptors and populate the UUID, NGUID and EUI64 fileds in the NVMe namespace structure with these values. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 87

[PATCH v2 0/8] Implement NVMe Namespace Descriptor Identification

2017-06-01 Thread Johannes Thumshirn
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

[PATCH v2 0/8] Implement NVMe Namespace Descriptor Identification

2017-06-01 Thread Johannes Thumshirn
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

[PATCH v2 7/8] nvmet: allow overriding the NVMe VS via configfs

2017-06-01 Thread Johannes Thumshirn
Allow overriding the announced NVMe Version of a via configfs. This is particularly helpful when debugging new features for the host or target side without bumping the hard coded version (as the target might not be fully compliant to the announced version yet). Signed-off-by: Johannes Thumshirn

[PATCH v2 7/8] nvmet: allow overriding the NVMe VS via configfs

2017-06-01 Thread Johannes Thumshirn
Allow overriding the announced NVMe Version of a via configfs. This is particularly helpful when debugging new features for the host or target side without bumping the hard coded version (as the target might not be fully compliant to the announced version yet). Signed-off-by: Johannes Thumshirn

[PATCH v2 8/8] nvmet: use NVME_IDENTIFY_DATA_SIZE

2017-06-01 Thread Johannes Thumshirn
Use NVME_IDENTIFY_DATA_SIZE define instead of hard coding the magic 4096 value. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/admin-cmd.c | 4 ++-- drivers/nvme/target/discovery.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/driver

[PATCH v2 6/8] nvme: provide UUID value to userspace

2017-06-01 Thread Johannes Thumshirn
for the NGUID. For the UUID attribute add a check wheter the namespace has a UUID assigned to it and return this or return the NGUID to maintain backwards compatibility. This should give userspace a chance to catch up. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hell

[PATCH v2 8/8] nvmet: use NVME_IDENTIFY_DATA_SIZE

2017-06-01 Thread Johannes Thumshirn
Use NVME_IDENTIFY_DATA_SIZE define instead of hard coding the magic 4096 value. Signed-off-by: Johannes Thumshirn --- drivers/nvme/target/admin-cmd.c | 4 ++-- drivers/nvme/target/discovery.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/target/admin-cmd.c

[PATCH v2 6/8] nvme: provide UUID value to userspace

2017-06-01 Thread Johannes Thumshirn
for the NGUID. For the UUID attribute add a check wheter the namespace has a UUID assigned to it and return this or return the NGUID to maintain backwards compatibility. This should give userspace a chance to catch up. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Hannes

[PATCH v2 2/8] nvme: rename uuid to nguid in nvme_ns

2017-06-01 Thread Johannes Thumshirn
the nguid to sysfs in the uuid sysfs attribute, but this can't be changed anymore without possibly breaking existing userspace. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- driver

[PATCH v2 2/8] nvme: rename uuid to nguid in nvme_ns

2017-06-01 Thread Johannes Thumshirn
the nguid to sysfs in the uuid sysfs attribute, but this can't be changed anymore without possibly breaking existing userspace. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/nvme/host/core.c | 10 +- drivers/nvme/host/nvme.h | 2

[PATCH v2 1/8] nvme: introduce NVMe Namespace Identification Descriptor structures

2017-06-01 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- include/linux/nvme.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/linux/nvme.h b/include/linux/nvme.h index b625bacf37ef..afa6ef484e50 100644 --- a/include/linux/nvme.h +++ b/include/linux/

[PATCH v2 4/8] nvmet: add uuid field to nvme_ns and populate via configfs

2017-06-01 Thread Johannes Thumshirn
Add the UUID field from the NVMe Namespace Identification Descriptor to the nvmet_ns structure and allow it's population via configfs. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/configfs.c | 31 +++ drivers/nvme/target/n

[PATCH v2 1/8] nvme: introduce NVMe Namespace Identification Descriptor structures

2017-06-01 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- include/linux/nvme.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/linux/nvme.h b/include/linux/nvme.h index b625bacf37ef..afa6ef484e50 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@ -288,6 +288,7 @@ enum

[PATCH v2 4/8] nvmet: add uuid field to nvme_ns and populate via configfs

2017-06-01 Thread Johannes Thumshirn
Add the UUID field from the NVMe Namespace Identification Descriptor to the nvmet_ns structure and allow it's population via configfs. Signed-off-by: Johannes Thumshirn --- drivers/nvme/target/configfs.c | 31 +++ drivers/nvme/target/nvmet.h| 1 + 2 files

[PATCH v2 3/8] nvmet: implement namespace identify descriptor list

2017-06-01 Thread Johannes Thumshirn
o maintain backward compatibiliy with older implementations without Namespace Identify Descriptor list support. Also as the Namespace Identify Descriptor list is the only mandatory feature change between 1.2.1 and 1.3.0 we can bump the advertised version as well. Signed-off-by: Johannes Thumshir

[PATCH v2 3/8] nvmet: implement namespace identify descriptor list

2017-06-01 Thread Johannes Thumshirn
o maintain backward compatibiliy with older implementations without Namespace Identify Descriptor list support. Also as the Namespace Identify Descriptor list is the only mandatory feature change between 1.2.1 and 1.3.0 we can bump the advertised version as well. Signed-off-by: Johannes Thumshirn --

[PATCH v1 3/7] nvmet: implement namespace identify descriptor list

2017-05-31 Thread Johannes Thumshirn
o the host to maintain backward compatibiliy with older implementations without Namespace Identify Descriptor list support. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/admin-cmd.c | 63 + include/linux/nvme.h| 18

[PATCH v1 3/7] nvmet: implement namespace identify descriptor list

2017-05-31 Thread Johannes Thumshirn
o the host to maintain backward compatibiliy with older implementations without Namespace Identify Descriptor list support. Signed-off-by: Johannes Thumshirn --- drivers/nvme/target/admin-cmd.c | 63 + include/linux/nvme.h| 18 2 files c

[PATCH v1 6/7] nvme: change magic 4096 to SZ_4K

2017-05-31 Thread Johannes Thumshirn
Change the magic 4096 or 0x1000 to SZ_4K so it's easier to spot typos. The magic numbers in the BUILD_BUG_ON() calls are left in place as there are no defines used for the other sizes as well. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/host/core.c

[PATCH v1 2/7] nvmet: add uuid field to nvme_ns and populate via configfs

2017-05-31 Thread Johannes Thumshirn
Add the UUID field from the NVMe Namespace Identification Descriptor to the nvmet_ns structure and allow it's population via configfs. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/configfs.c | 31 +++ drivers/nvme/target/n

[PATCH v1 5/7] nvme: provide UUID value to userspace

2017-05-31 Thread Johannes Thumshirn
for the NGUID. For the UUID attribute add a check wheter the namespace has a UUID assigned to it and return this or return the NGUID to maintain backwards compatibility. This should give userspace a chance to catch up. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/host/core.

[PATCH v1 6/7] nvme: change magic 4096 to SZ_4K

2017-05-31 Thread Johannes Thumshirn
Change the magic 4096 or 0x1000 to SZ_4K so it's easier to spot typos. The magic numbers in the BUILD_BUG_ON() calls are left in place as there are no defines used for the other sizes as well. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c| 4 ++-- drivers/nvme/host

[PATCH v1 2/7] nvmet: add uuid field to nvme_ns and populate via configfs

2017-05-31 Thread Johannes Thumshirn
Add the UUID field from the NVMe Namespace Identification Descriptor to the nvmet_ns structure and allow it's population via configfs. Signed-off-by: Johannes Thumshirn --- drivers/nvme/target/configfs.c | 31 +++ drivers/nvme/target/nvmet.h| 1 + 2 files

[PATCH v1 5/7] nvme: provide UUID value to userspace

2017-05-31 Thread Johannes Thumshirn
for the NGUID. For the UUID attribute add a check wheter the namespace has a UUID assigned to it and return this or return the NGUID to maintain backwards compatibility. This should give userspace a chance to catch up. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 25

[PATCH v1 0/7] Implement NVMe Namespace Descriptor Identification

2017-05-31 Thread Johannes Thumshirn
) * 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 (7): nvme: rename uuid to nguid in nvme_ns nvmet: add uuid field

[PATCH v1 0/7] Implement NVMe Namespace Descriptor Identification

2017-05-31 Thread Johannes Thumshirn
) * 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 (7): nvme: rename uuid to nguid in nvme_ns nvmet: add uuid field

[PATCH v1 1/7] nvme: rename uuid to nguid in nvme_ns

2017-05-31 Thread Johannes Thumshirn
the nguid to sysfs in the uuid sysfs attribute, but this can't be changed anymore without possibly breaking existing userspace. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/host/core.c | 10 +- drivers/nvme/host/nvme.h | 2 +- 2 files changed, 6 insertions

[PATCH v1 7/7] nvmet: allow overriding the NVMe VS via configfs

2017-05-31 Thread Johannes Thumshirn
Allow overriding the announced NVMe Version of a via configfs. This is particularly helpful when debugging new features for the host or target side without bumping the hard coded version (as the target might not be fully compliant to the announced version yet). Signed-off-by: Johannes Thumshirn

[PATCH v1 7/7] nvmet: allow overriding the NVMe VS via configfs

2017-05-31 Thread Johannes Thumshirn
Allow overriding the announced NVMe Version of a via configfs. This is particularly helpful when debugging new features for the host or target side without bumping the hard coded version (as the target might not be fully compliant to the announced version yet). Signed-off-by: Johannes Thumshirn

[PATCH v1 1/7] nvme: rename uuid to nguid in nvme_ns

2017-05-31 Thread Johannes Thumshirn
the nguid to sysfs in the uuid sysfs attribute, but this can't be changed anymore without possibly breaking existing userspace. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 10 +- drivers/nvme/host/nvme.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH v1 4/7] nvme: get list of namespace descriptors

2017-05-31 Thread Johannes Thumshirn
If a target identifies itself as NVMe 1.3 compliant, try to get the list of Namespace Identification Descriptors and populate the UUID, NGUID and EUI64 fileds in the NVMe namespace structure with these values. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/host/

[PATCH v1 4/7] nvme: get list of namespace descriptors

2017-05-31 Thread Johannes Thumshirn
If a target identifies itself as NVMe 1.3 compliant, try to get the list of Namespace Identification Descriptors and populate the UUID, NGUID and EUI64 fileds in the NVMe namespace structure with these values. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 88

Re: [PATCH 3/7] nvmet: add eui64 field to nvme_ns and populate via configfs

2017-05-31 Thread Johannes Thumshirn
On 05/31/2017 11:46 AM, Christoph Hellwig wrote: > On Tue, May 30, 2017 at 11:45:25AM +0200, Johannes Thumshirn wrote: >> Mostly consistency. The current nvme host code has the EUI sprinkled all >> around. Sure I can drop it, but then what's the point in evaluating it >> on

Re: [PATCH 3/7] nvmet: add eui64 field to nvme_ns and populate via configfs

2017-05-31 Thread Johannes Thumshirn
On 05/31/2017 11:46 AM, Christoph Hellwig wrote: > On Tue, May 30, 2017 at 11:45:25AM +0200, Johannes Thumshirn wrote: >> Mostly consistency. The current nvme host code has the EUI sprinkled all >> around. Sure I can drop it, but then what's the point in evaluating it >> on

Re: [PATCH 0/7] Implement NVMe Namespace Descriptor Identification

2017-05-31 Thread Johannes Thumshirn
On 05/31/2017 11:43 AM, Christoph Hellwig wrote: > On Tue, May 30, 2017 at 10:08:15AM +0200, Johannes Thumshirn wrote: >> A patch for nvmetcli will follow shortly. > > Thanks. No really required but nice would be a nvme-cli subcommand > to read the values as well. Yes, t

Re: [PATCH 0/7] Implement NVMe Namespace Descriptor Identification

2017-05-31 Thread Johannes Thumshirn
On 05/31/2017 11:43 AM, Christoph Hellwig wrote: > On Tue, May 30, 2017 at 10:08:15AM +0200, Johannes Thumshirn wrote: >> A patch for nvmetcli will follow shortly. > > Thanks. No really required but nice would be a nvme-cli subcommand > to read the values as well. Yes, t

Re: [PATCH 7/7] nvme: provide UUID value to userspace

2017-05-30 Thread Johannes Thumshirn
On 05/30/2017 11:30 AM, Christoph Hellwig wrote: > Eww. This looks pretty sketchy and at least needs a good comment in > the source. Maybe even a printk_ratelimited warning. Comment sure, but do we really need a warning? -- Johannes Thumshirn S

Re: [PATCH 7/7] nvme: provide UUID value to userspace

2017-05-30 Thread Johannes Thumshirn
On 05/30/2017 11:30 AM, Christoph Hellwig wrote: > Eww. This looks pretty sketchy and at least needs a good comment in > the source. Maybe even a printk_ratelimited warning. Comment sure, but do we really need a warning? -- Johannes Thumshirn S

Re: [PATCH 2/7] nvmet: add uuid field to nvme_ns and populate via configfs

2017-05-30 Thread Johannes Thumshirn
On 05/30/2017 11:24 AM, Christoph Hellwig wrote: > This should be stored as a uuid_t (or rather uuid_be in the current > kernel, but I'm about to rename it), and use uuid_be_to_bin / uuid_to_bin > for parsing. OK, thought you ask me to do that. Which one do you prefer? -- Johannes

Re: [PATCH 2/7] nvmet: add uuid field to nvme_ns and populate via configfs

2017-05-30 Thread Johannes Thumshirn
On 05/30/2017 11:24 AM, Christoph Hellwig wrote: > This should be stored as a uuid_t (or rather uuid_be in the current > kernel, but I'm about to rename it), and use uuid_be_to_bin / uuid_to_bin > for parsing. OK, thought you ask me to do that. Which one do you prefer? -- Johannes

Re: [PATCH 3/7] nvmet: add eui64 field to nvme_ns and populate via configfs

2017-05-30 Thread Johannes Thumshirn
On 05/30/2017 11:25 AM, Christoph Hellwig wrote: > On Tue, May 30, 2017 at 10:08:18AM +0200, Johannes Thumshirn wrote: >> Add the EUI-64 field from the NVMe Namespace Identification Descriptor >> to the nvmet_ns structure and allow it's population via configfs. > > Is th

Re: [PATCH 3/7] nvmet: add eui64 field to nvme_ns and populate via configfs

2017-05-30 Thread Johannes Thumshirn
On 05/30/2017 11:25 AM, Christoph Hellwig wrote: > On Tue, May 30, 2017 at 10:08:18AM +0200, Johannes Thumshirn wrote: >> Add the EUI-64 field from the NVMe Namespace Identification Descriptor >> to the nvmet_ns structure and allow it's population via configfs. > > Is th

[PATCH 5/7] nvmet: implement namespace identify descriptor list

2017-05-30 Thread Johannes Thumshirn
o the host to maintain backward compatibiliy with older implementations without Namespace Identify Descriptor list support. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/admin-cmd.c | 75 + include/linux/nvme.h

[PATCH 6/7] nvme: get list of namespace descriptors

2017-05-30 Thread Johannes Thumshirn
If a target identifies itself as NVMe 1.3 compliant, try to get the list of Namespace Identification Descriptors and populate the UUID, NGUID and EUI64 fileds in the NVMe namespace structure with these values. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/host/

[PATCH 5/7] nvmet: implement namespace identify descriptor list

2017-05-30 Thread Johannes Thumshirn
o the host to maintain backward compatibiliy with older implementations without Namespace Identify Descriptor list support. Signed-off-by: Johannes Thumshirn --- drivers/nvme/target/admin-cmd.c | 75 + include/linux/nvme.h| 14 2 files c

[PATCH 6/7] nvme: get list of namespace descriptors

2017-05-30 Thread Johannes Thumshirn
If a target identifies itself as NVMe 1.3 compliant, try to get the list of Namespace Identification Descriptors and populate the UUID, NGUID and EUI64 fileds in the NVMe namespace structure with these values. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 88

[PATCH 7/7] nvme: provide UUID value to userspace

2017-05-30 Thread Johannes Thumshirn
for the NGUID. For the UUID attribute add a check wheter the namespace has a UUID assigned to it and return this or return the NGUID to maintain backwards compatibility. This should give userspace a chance to catch up. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/host/core.

[PATCH 7/7] nvme: provide UUID value to userspace

2017-05-30 Thread Johannes Thumshirn
for the NGUID. For the UUID attribute add a check wheter the namespace has a UUID assigned to it and return this or return the NGUID to maintain backwards compatibility. This should give userspace a chance to catch up. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 22

[PATCH 1/7] nvme: rename uuid to nguid in nvme_ns

2017-05-30 Thread Johannes Thumshirn
the nguid to sysfs in the uuid sysfs attribute, but this can't be changed anymore without possibly breaking existing userspace. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/host/core.c | 10 +- drivers/nvme/host/nvme.h | 2 +- 2 files changed, 6 insertions

[PATCH 1/7] nvme: rename uuid to nguid in nvme_ns

2017-05-30 Thread Johannes Thumshirn
the nguid to sysfs in the uuid sysfs attribute, but this can't be changed anymore without possibly breaking existing userspace. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 10 +- drivers/nvme/host/nvme.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH 3/7] nvmet: add eui64 field to nvme_ns and populate via configfs

2017-05-30 Thread Johannes Thumshirn
Add the EUI-64 field from the NVMe Namespace Identification Descriptor to the nvmet_ns structure and allow it's population via configfs. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/configfs.c | 48 ++ drivers/nvme/

[PATCH 2/7] nvmet: add uuid field to nvme_ns and populate via configfs

2017-05-30 Thread Johannes Thumshirn
Add the UUID field from the NVMe Namespace Identification Descriptor to the nvmet_ns structure and allow it's population via configfs. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/configfs.c | 48 ++ drivers/nvme/

[PATCH 4/7] nvme: also report include the EUI-64 in identify NS report

2017-05-30 Thread Johannes Thumshirn
Now that we can configure a namespace's EUI-64, report it back to the host in an 'Identify Namespace' command reply. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/nvme/target/admin-cmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvme/target/admin-c

<    5   6   7   8   9   10   11   12   13   14   >