lkml.org 
[lkml]   [2010]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/18] xstat: Add a pair of system calls to make extended file stats available [ver #6]
On Thu, 5 Aug 2010 22:55:06 -0500
Steve French <smfrench@gmail.com> wrote:

> On Thu, Aug 5, 2010 at 10:38 PM, Neil Brown <neilb@suse.de> wrote:
> > On Thu, 5 Aug 2010 16:52:18 -0700
> > Jeremy Allison <jra@samba.org> wrote:
>
> >> Don't add it as an EA. It's *not* an EA, it's a timestamp.
> >
> > I'm curious.  Why do you particularly care what interface the kernel uses to
> > provide you with access to this attribute?
> >
> > And given that it is an attribute that is not part of 'POSIX' or "UNIX", it
> > would seem to be an extension - an extended attribute.
> > As the Linux kernel does virtually nothing with this attribute except provide
> > access, it seems to be a very different class of thing to other timestamps.
> > Surely it is simply some storage associated with a file which is capable of
> > storing a timestamp, which can be set or retrieved by an application, and
> > which happens to be initialised to the current time when a file is created.
> >
> > Yes, to you it is a timestamp.  But to Linux it is a few bytes of
> > user-settable metadata.  Sounds like an EA to me.
> >
> > Or do you really want something like BSD's 'btime' which as I understand it
> > cannot be set.  Would that be really useful to you?
>
> Obviously the cifs and SMB2 protocols which Samba server support can
> ask the server to set the create time of a file (this is handled
> through xattrs today along with the "dos attribute" flags such as
> archive/hidden/system), but certainly it is much more common (and
> important) to read the creation time of an existing file.
>
>
> > Is there something important that I am missing?
>
> It is another syscall that Samba server would have to make - and xattr
> performance is extremely slow on some file systems (although
> presumably this one would be more likely to be stored in inode and
> perhaps not as bad on ext4, cifs and a few others such as ntfs).
>
>

Right. One has to consider that samba has to satisfy READDIRPLUS-like
calls, and on a large directory all of those extra syscalls are likely
to impact performance.

In my view, the ideal thing would be to add this field as an EA and
continue work on implementing xstat(). Adding it as an EA gives
userland a way to set this value, without needing to add a new utimes()
variant.

If/when xstat becomes available, samba could use that instead of the EA
for reading this value.

--
Jeff Layton <jlayton@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-08-06 13:19    [W:0.249 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site