[Linux-cachefs] [PATCH] NFS using CacheFS

Steve Dickson SteveD at redhat.com
Mon Oct 4 20:45:24 UTC 2004


Hey Trond,

Here here is the first stab at having NFS use the CacheFS that is currently
in the -mm tree. As you know CacheFS is a caching filesystem that allows
network filesystems, such as AFS and now NFS, to cache data pages on
the local disk. This is a big win (especially with read-only filesystems)
since it drastically cuts down on the amount of data read across the
network. Plus the cached data survives umounts and reboots (since CacheFS
journals the data). So when a client comes back up or  the filesystem is 
remounted,
all that is needed is a few small getattrs  to insure the data is still 
valid. If it is,
NFS reads are turned into local disk reads.... A Huge gain in 
performance!!!!

I have structured that patch so CacheFS is a mount option. I figured
this was the safest way to introduce CacheFS and not completely
break NFS.... And if for some reason, NFS is not able to get an
initial Cachefs cookie (i.e. it can't use CacheFS) , NFS will dynamically
turn off the mount option, disabling the use of the cache..

But as usual there are some issues....
1) NFS aliasing. The fact that:

mount hades:/hades /a
mount hades:/hades/xxx /b

creates separate super blocks causes problems for
CacheFS. With the current -mm code, these type of mount
actual causes CacheFS to crash (although I do have a proposed
patch that David is looking at).

2) NFS4 is not supported. I simply have not had time to get this working.
    But I will!!

3) There is no user level support. I realize this is extremely cheesy
     but I noticed that the NFS posix mount  option (in the 2.6 kernel)
     was no longer being used, so I high jacked it.  Which means
     to make NFS to used CacheFS you need to use the posix option:

     mount -o posix server:/export/home /mnt/server/home

Comments?

SteveD.

PS. The new CacheFS mailing that have been set up is at
http://www.redhat.com/mailman/listinfo/linux-cachefs
I encourage you and anybody else interested in this
type of technology to subscribe....



-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-2.6.9-rc3-mm2-cachefs-nfs.patch
Type: text/x-patch
Size: 23671 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-cachefs/attachments/20041004/85ec4a42/attachment.bin>


More information about the Linux-cachefs mailing list