lkml.org 
[lkml]   [2017]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] nvme: use uuid_t in nvme_ns
On Mon, Jun 12, 2017 at 12:12 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> struct nvme_ns still uses u u8 uuid[16], change it to using uuid_t and
> use the UUID API.

Thanks for an update.

See my further comments below.

> len = NVME_NIDT_UUID_LEN;
> - memcpy(ns->uuid, data + pos + sizeof(*cur), len);
> + uuid_copy(&ns->uuid, data + pos + sizeof(*cur));

So, this reveals two thins:
1) shall we define NVME_NIDT_UUID_LEN to be UUID_LEN or substitute it
completely with the latter?
2) Is the len variable used later in the function?

> - if (!memchr_inv(ns->uuid, 0, sizeof(ns->uuid)) ||
> + if (uuid_is_null(&ns->uuid) ||
> !memchr_inv(ns->nguid, 0, sizeof(ns->nguid)))

> u8 nguid[16];
> - u8 uuid[16];
> + uuid_t uuid;

Do you plan to switch nguid to be guid_t / uuid_t ?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2017-06-12 11:52    [W:0.315 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site