From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH v1] ACPI: Switch to use generic UUID API Date: Fri, 5 May 2017 09:30:35 +0200 Message-ID: <20170505073035.GA3112@lst.de> References: <20170504092151.88646-1-andriy.shevchenko@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Amir Goldstein Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org, Heikki Krogerus , Liam Girdwood , linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jarkko Sakkinen , Adrian Hunter , Benjamin Tissoires , Christoph Hellwig , Linux ACPI , tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Ben Skeggs , nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Zhang Rui , Borislav Petkov , Yisen Zhuang , Mathias Nyman , intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jani Nikula , Mark Brown , Bjorn Helgaas , Dan Williams , Andy Shevchenko List-Id: tpmdd-devel@lists.sourceforge.net On Fri, May 05, 2017 at 10:06:06AM +0300, Amir Goldstein wrote: > I much rather that you sort out uuid helpers in a way that will > satisfy the filesystem > needs (just provide the helpers don't need to convert filesystems code). Yeah. > IMO, you should acknowledge that the common use case for filesystems is > to handle an opaque char[16] which most likely holds a uuid_be and you > should provide 'neutral' helpers to satisfy this use case. > > The simplest would be to typedef uuid_t to struct uuid_be and to name 'neutral' > helpers' uuid_cmp/uuid_copy(uuid_t *, uuid_t *), similar to my proposal. It's not jut neutral, it's the right thing to to. The Apollo / DCE uuids (later also specified in RFC 4122) are big endian, so we should use the name there. > Christoph also suggested a similar treatment to typedef guid_t to > struct uuid_le. Exactly. The whole idea of "little endian UUIDs" comes from the Wintel world, and if you look at the relevant specs they are almost exclusively referred to as GUIDs. The magic XFS and AFS types for specific interpretations of one of the RFC4122 formats don't really help, but I'll just send a patch to kill them off for XFS ASAP to at least get that out, and we probably should revert at least "afs: Move UUID struct to linux/uuid.h" That moved the AFS mess to common code as a start, and then also clean up the way we generate random UUIDs, where we currently have le helper, a be helper and then also generate_random_uuid just to confuse the heck out of people. With no description of either of them.