Re: [PATCH 02/18] xstat: Add a pair of system calls to make extended file stats available [ver #6]

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff Layton
Date: Sunday, August 1, 2010 - 6:40 am

On Thu, 29 Jul 2010 09:04:01 +1000
Neil Brown <neilb@suse.de> wrote:


The problem with the above approach is that you're assuming that the
data in question is always accessed via the CIFS server. If someone
comes along and messes with the data outside of CIFS, then samba won't
have knowledge of that and the birthtime will be wrong.

There's some history behind this as well -- samba tracks windows ACLs
via xattr and it can be very problematic keeping those up to date when
the data is accessed outside of samba.

I think presenting this data via xattr makes the most sense. It's
simple and as Neil points out, it also provides us with a clealy
settable interface. If we ever get an xstat-like syscall, we can always
present the same data via that as well.

I also think it's quite reasonable to consider tracking birthtime in a
generic inode field. In the absence of that, filesystems could track
this themselves in their filesystem-specific inode structs.

Furthermore, I'll go ahead and propose the following (simple) semantics:

1) birthtime is initialized to the current time when a new inode is
created

2) it's settable via the xattr to an arbitrary value

Either way, the xattr for this ought to be named the same on all
filesystems. Samba shouldn't need to know or care what the underlying
filesystem is, as long as it presents the correct xattr.

That should make samba happy, and be reasonably simple to implement.

-- 
Jeff Layton <jlayton@redhat.com>
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/18] Extended file stat functions [ver #6], David Howells, (Wed Jul 14, 7:17 pm)
Re: [PATCH 02/18] xstat: Add a pair of system calls to mak ..., Christoph Hellwig, (Sun Jul 18, 1:48 am)
Re: [PATCH 12/18] xstat: Add a dentry op to handle automou ..., Christoph Hellwig, (Sun Jul 18, 1:50 am)
Re: [PATCH 18/18] xstat: Provide a mechanism to gather ext ..., Christoph Hellwig, (Sun Jul 18, 1:51 am)
Re: [PATCH 02/18] xstat: Add a pair of system calls to mak ..., Jeff Layton, (Sun Aug 1, 6:40 am)