From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com ([134.134.136.65]:1190 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750883AbdECQgV (ORCPT ); Wed, 3 May 2017 12:36:21 -0400 Message-ID: <1493829352.30052.6.camel@linux.intel.com> Subject: Re: [RFC][PATCH] linux/uuid.h: hoist uuid_is_null() helper from libnvdimm From: Andy Shevchenko To: Amir Goldstein , Christoph Hellwig Cc: Miklos Szeredi , Mimi Zohar , Konrad Rzeszutek Wilk , Richard Weinberger , "Darrick J . Wong" , Mark Fasheh , Al Viro , linux-xfs , linux-unionfs@vger.kernel.org, linux-fsdevel , Dan Williams , David Howells , Theodore Tso Date: Wed, 03 May 2017 19:35:52 +0300 In-Reply-To: References: <1493756363-5113-1-git-send-email-amir73il@gmail.com> <1493802823.4154.3.camel@linux.intel.com> <1493809233.30052.1.camel@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 2017-05-03 at 15:42 +0300, Amir Goldstein wrote: > On Wed, May 3, 2017 at 2:00 PM, Andy Shevchenko > wrote: > > On Wed, 2017-05-03 at 13:05 +0300, Amir Goldstein wrote: > > > On Wed, May 3, 2017 at 12:13 PM, Andy Shevchenko > I can hear the voices of > > > those saying that there should be a 'natural' helper > > > uuid_is_null(u8 > > > *) for the > > > users that represent uuid as u8[16] (i.e. filesystems and sb- > > > >s_uuid). > > > > u8 * doesn't represent UUID as a type. > > Perhaps we need to reflect this in the name of the function somehow. > > > > OK, since you have no time nor the intention to convert filesystem > code > to use uuid_le uuid_be I suppose. I noticed core developers doesn't support endianess feature of UUID: https://lkml.org/lkml/2016/5/25/724 That's also why I don't want to touch filesystem stuff. > (not should you), I see 2 options for filesystems/VFS: > > 1. Use the simple u8* libnvdimm helper proposed by this patch > 2. Hoist uuid_t + helpers from fs/xfs/uuid.* to linux/uuid.h > lib/uuid.c > > If option #2 is preferred, I think we should conform to libuuid's > helper > name uuid_is_null() (instead of freebsd's uuid_is_nil()) I think option #2 is preferred and we need actually to submit some generic uuid_{be|le}_cmp() helpers. For now it's blocked by Gcc bug. We may remove const from the prototypes for now and add them later when the bug will be fixed. > and maybe > convert libnvdimm and bluetooth to use the xfs helpers as well. > > Christoph, > > Since you got me started on this helper, do you have a preference? -- Andy Shevchenko Intel Finland Oy