[Linux-cachefs] Re: [PATCH] NFS using CacheFS

David Howells dhowells at redhat.com
Mon Oct 11 15:18:37 UTC 2004


> > The 'fscache' flag will be coming along with the nfs4 support, since
> > nfs4 mounting code does not have an open (unused) mounting flag....
> 
> is such a flag even neccessary?
> The way I see fscache is that its operations will be no-ops anyway if you
> haven't mounted any backing cache.

There are two reasons:

 (1) The fscache middle bit builds up a cookie tree even if there are no
     backing caches. This means if the cache is added later (NFS root, for
     example), the netfs then starts caching immediately without requiring a
     remount.

 (2) NFS is not currently safe with respect to fscache in the following
     situation:

	mount warthog:/warthog/x /x
	mount warthog:/warthog /y

     Because NFS ends up with two superblocks for what is one set of
     filehandles. This means it tries to get the same cookies out of fscache
     twice, which fscache is ill-equipped to handle.

     This also introduces unnecessary (IMNSHO) aliasing in each client of
     inodes and pages both.

     I have a patch to fix NFS to cope with this by modifying the get_sb()
     method to allow the filesystem to override the automatic selection of
     super->s_root as the root dentry. However, Al Viro is leery of the patch
     for some reason.

David




More information about the Linux-cachefs mailing list