lkml.org 
[lkml]   [2016]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/4] statx: Add a system call to make enhanced file info available
From
Date
On Tue, 2016-11-22 at 10:39 +0000, David Howells wrote:
> Dave Chinner <david@fromorbit.com> wrote:
>
> >
> > No. Just provide a 64 bit high resoultion field, and define it to
> > contain nanoseconds. When we need higher resolution to be exported
> > to userspace, we use a /feature flag/ to indicate that is contains
> > something like attoseconds or the like.
>
> That sounds suspiciously like a bad idea - if you're talking about a flag with
> a currently undefined meaning that the kernel can inflict on userspace without
> warning to change the meaning of the nanoseconds field to something we haven't
> defined yet.
>
> Userspace would have to ask for it.
>

Agreed.

I think the best thing would be to simply plan to add new femtoseconds
fields in the struct if/when it becomes needed. We can easily hide the
ugliness of the fields not being adjacent to the rest of the timestamp
behind the femtosecond resolution glibc API that will also be needed.

If we're worried about space utilization, then let's pad the struct out
by 4 extra 32-bit fields in advance of that.

Again, a major design point of statx is that it is to be extendable. I
don't see any reason that we need to do this now.

--
Jeff Layton <jlayton@redhat.com>

\
 
 \ /
  Last update: 2016-11-22 14:55    [W:0.111 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site