Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1663388
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] nvme: use uuid_t in nvme_ns |
| Date | 2017-06-12 12:00 +0200 |
| Message-ID | <tRuiB-sU-9@gated-at.bofh.it> (permalink) |
| References | <tRtFV-fr-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] nvme: use uuid_t in nvme_ns Johannes Thumshirn <jthumshirn@suse.de> - 2017-06-12 11:20 +0200
Re: [PATCH v2] nvme: use uuid_t in nvme_ns Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-12 12:00 +0200
Re: [PATCH v2] nvme: use uuid_t in nvme_ns Johannes Thumshirn <jthumshirn@suse.de> - 2017-06-12 12:10 +0200
Re: [PATCH v2] nvme: use uuid_t in nvme_ns Christoph Hellwig <hch@lst.de> - 2017-06-12 13:10 +0200
Re: [PATCH v2] nvme: use uuid_t in nvme_ns Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-12 15:20 +0200
Re: [PATCH v2] nvme: use uuid_t in nvme_ns Christoph Hellwig <hch@lst.de> - 2017-06-12 18:10 +0200
Re: [PATCH v2] nvme: use uuid_t in nvme_ns Sagi Grimberg <sagi@grimberg.me> - 2017-06-15 11:00 +0200
csiph-web