From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751218AbdFCFS7 (ORCPT ); Sat, 3 Jun 2017 01:18:59 -0400 Received: from verein.lst.de ([213.95.11.211]:57106 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751167AbdFCFS6 (ORCPT ); Sat, 3 Jun 2017 01:18:58 -0400 Date: Sat, 3 Jun 2017 07:18:56 +0200 From: Christoph Hellwig To: Sagi Grimberg Cc: Johannes Thumshirn , Christoph Hellwig , Keith Busch , Hannes Reinecke , maxg@mellanox.com, Linux NVMe Mailinglist , Linux Kernel Mailinglist Subject: Re: [PATCH v3 3/8] nvmet: implement namespace identify descriptor list Message-ID: <20170603051856.GA7093@lst.de> References: <20170602094536.25775-1-jthumshirn@suse.de> <20170602094536.25775-4-jthumshirn@suse.de> <4f03d4c0-6f7b-dbc4-b0ee-bebe77e80ea6@grimberg.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4f03d4c0-6f7b-dbc4-b0ee-bebe77e80ea6@grimberg.me> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 02, 2017 at 04:46:40PM +0300, Sagi Grimberg wrote: > >> switch (type) { >> case NVME_NQN_NVME: >> diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h >> index cfc5c7fb0ab7..4c6cb5ea1186 100644 >> --- a/drivers/nvme/target/nvmet.h >> +++ b/drivers/nvme/target/nvmet.h >> @@ -46,6 +46,7 @@ struct nvmet_ns { >> u32 blksize_shift; >> loff_t size; >> u8 nguid[16]; >> + uuid_be uuid; > > This should be uuid_le to match the rest of NVMe. It shouldn't. A RFC4122 uuid is always in "big endian" notation. A little endiane uuid doesn't exist, it's called a GUID in Wintel speak and isn't used in NVMe. My new uuid tree tries to fix up the confusion by renaming our uuid_be type to uuid_t and uuid_le to guid_t. > Also, it would be useful to generate a random default with uuid_le_gen() > for a better out-of-the-box experience. That's actually a good point. Just needs to be uuid_be_gen/uuid_gen :)