Re: cachefs: need help to finish code...

Jeff Garzik (jgarzik@pobox.com)
Mon, 21 Jun 1999 12:31:58 -0400


(linux-fsdevel added to cc list)

Juan Antonio Martinez wrote:
>
> As no cachefs code available for 2.2.X and my real need of it,
> I started writting... after a crazy,nightmared weekend I have:
>
> - /proc fs code complete
> - cachemount & cacheumount scripts done
> - cachefsd skeleton
> - vfs skeleton... just starting my problems:
>
> Due to lack of VFS programming information, I had to stop writing..
> my module loads, mounts and umount filesystem, and play with /proc/fs/cachefs
> entries... but does nothing with filesystem itself :-(

The best way to get up-and-running quickly, IMHO, would be to code a
userland NFS-style server. That makes some of the tougher problems
simply go away ;-)

Here are my ideas on cachefs:

o Coda, and the forthcoming Intermezzo, are wonderful but do not exactly
fit the needs of 'caching a slow fs'. One requirement is that cachefs
can support just about _any_ fs: not just NFS, but iso9660, FAT, and
other filesystems. A really cool thing is to cache a CD-ROM (presuming
you don't have a 32X.. I don't... :))

o Support multiple caches.
o Support multiple devices/files within a single cache.

o Register a character device through which userland can add/edit/delete
cache metadata. I planned a 'cachectl' program which would open
/dev/cachefs, and use ioctls to add areas to the cache and such.

o Make the cachefs "stupid simple" for the first version. Don't get
fancy with inodes and dcache and such. Just get it basically working.

> Where can i find info and clear samples ( "read the kernel source" is not enought ) on:
> - VFS programming
> - Handling dcache and block device operations
> - Mapping inodes into filenames and viceversa
> - Redirecting inode queries from one filesystem to another

My favorite VFS links, in preference order:

Peter Braam's VFS slides:
http://www.coda.cs.cmu.edu/doc/talks/linuxvfs

Richard Gooch's VFS docs:
http://www.atnf.csiro.au/~rgooch/linux/vfs.txt

Linux Kernel, online book:
http://sunsite.unc.edu/linux/LDP/tlk/tlk.html

Michael Johnson's Writing Device Drivers:
http://www.redhat.com/~johnsonm/devices.html

All of these links were from a general collection of kernel hacking docs
at http://selva.dit.upm.es/~jmseyas/linux/kernel/hackers-docs.html

If I have time while video drivers are compiling I will look at your
code and see if I can add some things to it. I can probably write the
/dev/cachefs interface if nothing else.

Regards,

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/