[Linux-cachefs] Using latest code

David Howells dhowells at redhat.com
Tue Nov 18 16:28:57 UTC 2008


Daire Byrne <Daire.Byrne at framestore.com> wrote:

> I'd like to test out the latest set of patches and code but I can't figure
> out how to use git to get the kernel source to the "commit" point mentioned
> in the tarball.

If you have a current copy of Linus's tree you can use as a reference to
create a GIT repository off of, say /foo, then you can do:

	git clone -l -s --reference /foo /foo /my/fscache/tree

If not, then do this:

	git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git /my/fscache/tree

Then when you've created a tree to play with, do:

	cd /my/fscache/tree
	git reset --hard <commit-id>

That'll wind the GIT tree back to where you want it to be.

> Any chance you could provide some foolproof instructions for getting the
> latest fscache code working?

Well, I'm just trying to fix a bug in it, and then I'll release a bunch of
patches that are built on top of James Morris's security tree next branch.  To
get that, do:

	git clone git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/security-testing-2.6-next.git /my/fscache/tree

You'll need this to get the current credentials code that CacheFiles requires
for working around security.

> It is a pity this code is not kept up to date in the EL5 kernel.

The stuff in the RHEL-5 kernel is somewhat out of date, and requires kABI
changes to be brought up to date.

> I tried the latest cachefilesd RPM with the EL5 version of cachefiles but
> the daemon crashes out after a few minutes.

> Also is it normal to have the cachefilesd process chew 100% for long periods
> of time? A quick strace suggests it is doing a lot of "culls" but the
> filesystem is never near full enough for that to trigger.

Is it culling things?  Or is it building up its cull table?  I suspect it's
probably the latter.  Currently it does a tree scan of the cache's directory
structure.  This has proven to be very slow and very CPU intensive.  What it
requires is a couple of indices adding to the mix, but that leads to
consistency issues over power failure:-/

> Have you considered using nfscache on a server to reexport a cached version
> of the NFS mount? In WAN environments this is a useful way to automatically
> move data into a local cache at a remote office. It is something we are
> considering trying - do you see any problems with this kind of setup? I'm
> currently just exporting a cached NFS mount over Samba (you can't reexport
> NFS which is a shame).

When you say 'nfscache' do you mean 'NFS with FS-Cache', or do you mean
something else entirely?

David




More information about the Linux-cachefs mailing list