From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com ([134.134.136.31]:44391 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752141AbdECRPx (ORCPT ); Wed, 3 May 2017 13:15:53 -0400 Message-ID: <1493831747.30052.10.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 20:15:47 +0300 In-Reply-To: <1493829352.30052.6.camel@linux.intel.com> References: <1493756363-5113-1-git-send-email-amir73il@gmail.com> <1493802823.4154.3.camel@linux.intel.com> <1493809233.30052.1.camel@linux.intel.com> <1493829352.30052.6.camel@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 2017-05-03 at 19:35 +0300, Andy Shevchenko wrote: > 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 renamed as proposed and updated my branch. By the way, notice that uuid_v1 type (which had been moved to uuid.h already) is the same what xfs uses as uuid_t. So, helpers against it we can prefix with uuid_v1_[foo_bar()]. -- Andy Shevchenko Intel Finland Oy