Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1650512

Re: [PATCH 10/23] afs: switch to use uuid_t and uuid_gen

From Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 10/23] afs: switch to use uuid_t and uuid_gen
Date 2017-05-25 15:40 +0200
Message-ID <tL19D-me-17@gated-at.bofh.it> (permalink)
References (1 earlier) <tIngm-6dz-33@gated-at.bofh.it> <tK0yZ-NW-15@gated-at.bofh.it> <tKdPC-N6-69@gated-at.bofh.it> <tKhTc-3GR-15@gated-at.bofh.it> <tL0GC-c1-11@gated-at.bofh.it>
Organization Intel Finland Oy

Show all headers | View raw


On Thu, 2017-05-25 at 15:00 +0200, Christoph Hellwig wrote:
> On Tue, May 23, 2017 at 04:11:39PM +0300, Andy Shevchenko wrote:
> > Since we introduced a union it's possible that we might access the
> > member which wasn't last modified one. So, my comment is to give an
> > attention on such possibility and avoid if there is an aliasing
> > happened.
> 
> We do for AFS (and XFS for fs fsid).  My preference would be to
> not have the v1 struct defintion but instead provide a few
> helpers in uuid.h that use get_unaligned_be* if needed:
> 
> 	uuid_v1_time_low()
> 	uuid_v1_time_mid()
> 	uuid_v1_time_time_hi_and_version()..
> 
> From his previously reply it seems like Dave doesn't like that idea
> too much, in which case I suspect moving struct uuid_v1 back into
> afs and living with cast in it is the way to go.

Personally I don't like that union stuff, so, definitely my vote to get
rid of AFS stuff in generic helpers.

OTOH if there will be more users of such API then something like you
proposed would be sufficient without introducing a union.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 10/23] afs: switch to use uuid_t and uuid_gen Christoph Hellwig <hch@lst.de> - 2017-05-25 15:10 +0200
  Re: [PATCH 10/23] afs: switch to use uuid_t and uuid_gen Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-05-25 15:40 +0200

csiph-web