[PATCH 1/5] nvmet: EUI64 support

Ewan D. Milne emilne at redhat.com
Wed May 9 08:43:19 PDT 2018


On Fri, 2018-05-04 at 13:28 +0200, Hannes Reinecke wrote:
> Allow the setting of an IEEE Extended Unique Identifier (EUI64) for
> each namespace. As the OUI is per subsystem ensure that the OUI
> part of the EUI64 value (ie the top 3 bytes) are matching for each
> namespace.
> 
> Signed-off-by: Hannes Reinecke <hare at suse.com>
> ---
>  drivers/nvme/target/admin-cmd.c |  6 ++---
>  drivers/nvme/target/configfs.c  | 58 +++++++++++++++++++++++++++++++++++++++++
>  drivers/nvme/target/nvmet.h     |  2 ++
>  3 files changed, 62 insertions(+), 4 deletions(-)
> 
...
> diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
> index ad9ff27234b5..3dc2b2ae56e5 100644
> --- a/drivers/nvme/target/configfs.c
> +++ b/drivers/nvme/target/configfs.c
> @@ -378,6 +378,49 @@ static ssize_t nvmet_ns_device_nguid_store(struct config_item *item,
>  
>  CONFIGFS_ATTR(nvmet_ns_, device_nguid);
>  
> +static ssize_t nvmet_ns_device_eui64_show(struct config_item *item, char *page)
> +{
> +	return sprintf(page, "%llx\n",
> +		       (unsigned long long)&to_nvmet_ns(item)->eui64);
> +}

Notwithstanding Christoph's comment, patch 3/5 changes the above line
again to remove the "&", so you should do that here in the first place
if you keep it.

-Ewan






More information about the Linux-nvme mailing list