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>
--