[RFC][PATCH 06/10] cifs: define inode-level cache object and register them
Jeff Layton
jlayton at samba.org
Fri Jun 25 10:53:06 MDT 2010
On Fri, 25 Jun 2010 13:55:49 +0100
David Howells <dhowells at redhat.com> wrote:
> Suresh Jayaraman <sjayaraman at suse.de> wrote:
>
> > I think the creation time is currently being ignored as we won't be able
> > to accomodate in POSIX stat struct.
>
> The FS-Cache interface doesn't use the POSIX stat struct, but it could be
> really useful to save it and use it for cache coherency inside the kernel.
>
> Out of interest, what does Samba do when it comes to generating a creation time
> for UNIX where one does not exist?
>
(cc'ing samba-technical since we're talking about the create time)
Looks like it mostly uses the ctime. IMO, the mtime would be a better
choice since it changes less frequently, but I don't guess that it
matters very much.
I have a few patches that make the cifs_iget code do more stringent
checks. One of those makes it use the create time like an i_generation
field to guard against matching inodes that have the same number but
that have undergone a delete/create cycle. They need a bit more testing
but I'm planning to post them in time for 2.6.36.
Because of how samba generates this number, it could be somewhat
problematic to do this. What may save us though is that Linux<->Samba
mostly uses unix extensions unless someone has specifically disabled
them on either end. The unix extension calls don't generally send any
sort of create time field, so we can't rely on it in those codepaths
anyway.
--
Jeff Layton <jlayton at samba.org>
More information about the samba-technical
mailing list