[Linux-cachefs] Simple question

David Howells dhowells at redhat.com
Fri Feb 4 16:24:01 UTC 2005


Henk Poley <hpoley at dds.nl> wrote:

> Can cachefs be used to cache just any mount, like on Solaris (also used with 
> mounting slow CD-ROMs),

No; the filesystem (iso9660, ext3, nfs, etc) containing the data you want to
cache must explicitly talk to cachefs at the moment. The reason for this is
that the netfs (or discfs) and not cachefs knows the semantics of indexing,
expiry, writeback, security, etc.

> or is it only for NFS?

As it stands in the vanilla kernel, I don't believe NFS uses it, only kAFS
does. However, the interface is meant to be generic, and there's no reason
other filesystems can't make use of it.

> There have been experiments with live "preloading" files used at boottime,
> but as since these files are stored all over the disk this hasn't knocked
> off that much time. In the end someone tried copying the files needed at
> boottime to a new partition so the boot files were all next to each other,
> and after that copying the rest of the filesystem. This worked much better,
> but it's a rather cumbersome thing to do (need to pick files, takes lots of
> time to copy, etc. etc.). With cachefs everything should be solved
> automagicly.

Linus suggested something like this, and yes it would be possible. It would
give you a block-by-block sequence of what page of what file is needed when.

> So basicly the next part of my question is, would say a 128MB cachefs 
> partition help in the bootprocess by bringing all the files together? 
> (transparent copies of the files, that is)

Theoretically, yes; if you want to make ext3 or whatever you use for your
rootfs use cachefs. Cachefs on a blockdev would make more sense for this than
Cachefs on scattered files as you'd then be governed by the underlying
filesystem's method of laying out.

David




More information about the Linux-cachefs mailing list