1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/sys/fs/coda
Robert Watson 38ab9a906a Implement a rudimentary access cache for the Coda kernel module,
modeled on the access cache found in NFS, smbfs, and the Linux coda
module.  This is a positive access cache of a single entry per file,
tracking recently granted rights, but unlike NFS and smbfs,
supporting explicit invalidation by the distributed file system.

For each cnode, maintain a C_ACCCACHE flag indicating the validity
of the cache, and a cached uid and mode tracking recently granted
positive access control decisions.

Prefer the cache to venus_access() in VOP_ACCESS() if it is valid,
and when we must fall back to venus_access(), update the cache.

Allow Venus to clear the access cache, either the whole cache on
CODA_FLUSH, or just entries for a specific uid on CODA_PURGEUSER.
Unlike the Coda module on Linux, we don't flush all entries on a
user purge using a generation number, we instead walk present
cnodes and clear only entries for the specific user, meaning it is
somewhat more expensive but won't hit all users.

Since the Coda module is agressive about not keeping around
unopened cnodes, the utility of the cache is somewhat limited for
files, but works will for directories.  We should make Coda less
agressive about GCing cnodes in VOP_INACTIVE() in order to improve
the effectiveness of in-kernel caching of attributes and access
rights.

MFC after:	1 month
2008-02-13 15:45:12 +00:00
..
cnode.h Implement a rudimentary access cache for the Coda kernel module, 2008-02-13 15:45:12 +00:00
coda_fbsd.c Since we're now actively maintaining the Coda module in the FreeBSD source 2008-02-10 11:18:12 +00:00
coda_io.h Since we're now actively maintaining the Coda module in the FreeBSD source 2008-02-10 11:18:12 +00:00
coda_kernel.h Since we're now actively maintaining the Coda module in the FreeBSD source 2008-02-10 11:18:12 +00:00
coda_opstats.h Since we're now actively maintaining the Coda module in the FreeBSD source 2008-02-10 11:18:12 +00:00
coda_pioctl.h Since we're now actively maintaining the Coda module in the FreeBSD source 2008-02-10 11:18:12 +00:00
coda_psdev.c Rather than having the Coda module use its own namecache, use the global 2008-02-13 13:06:22 +00:00
coda_psdev.h Since we're now actively maintaining the Coda module in the FreeBSD source 2008-02-10 11:18:12 +00:00
coda_subr.c Implement a rudimentary access cache for the Coda kernel module, 2008-02-13 15:45:12 +00:00
coda_subr.h Rather than having the Coda module use its own namecache, use the global 2008-02-13 13:06:22 +00:00
coda_venus.c Since we're now actively maintaining the Coda module in the FreeBSD source 2008-02-10 11:18:12 +00:00
coda_venus.h Since we're now actively maintaining the Coda module in the FreeBSD source 2008-02-10 11:18:12 +00:00
coda_vfsops.c Since we're now actively maintaining the Coda module in the FreeBSD source 2008-02-10 11:18:12 +00:00
coda_vfsops.h Since we're now actively maintaining the Coda module in the FreeBSD source 2008-02-10 11:18:12 +00:00
coda_vnops.c Implement a rudimentary access cache for the Coda kernel module, 2008-02-13 15:45:12 +00:00
coda_vnops.h Rather than having the Coda module use its own namecache, use the global 2008-02-13 13:06:22 +00:00
coda.h Replace CODA_OPEN with CODA_OPEN_BY_FD: coda_open was disabled because 2007-07-11 21:32:08 +00:00
README
TODO Forced commit to recognize repo-copy of Coda files from src/sys/coda to 2007-07-12 20:40:38 +00:00

$FreeBSD$

                Announcing the Availability of the
                        Coda Distributed
                           Filesystem
                              for
                         BSD Unix Systems

        Coda is a distributed filesystem like NFS and AFS.  It is
freely available, like NFS.  But it functions much like AFS in being a
"stateful" filesystem.  Coda and AFS cache files on your local
machine to improve performance.  But Coda goes a step further than AFS
by letting you access the cached files when there is no available
network, viz. disconnected laptops and network outages.  In Coda, both
the client and server are outside the kernel which makes them easier
to experiment with.

To get more information on Coda, I would like to refer people to
        http://www.coda.cs.cmu.edu
There is a wealth of documents, papers, and theses there.  There is
also a good introduction to the Coda File System in
        http://www.coda.cs.cmu.edu/ljpaper/lj.html

Coda was originally developed as an academic prototype/testbed.  It is
being polished and rewritten where necessary.  Coda is a work in
progress and does have bugs.  It is, though, very usable.  Our
interest is in making Coda available to as many people as possible and
to have Coda evolve and flourish.

The bulk of the Coda filesystem code supports the Coda client
program, the Coda server program and the utilities needed by both.
All these programs are unix programs and can run equally well on any
Unix platform.  Our main development thrust is improving these
programs.  There is a small part of Coda that deals with the kernel to
filesystem interface.  This code is OS specific (but should not be
platform specific).

Coda is currently available for several OS's and platforms:
        Freebsd-2.2.5: i386
        Freebsd-2.2.6: i386
	Freebsd -current: i386
        linux 2.0: i386 & sparc
        linux 2.1: i386 & sparc
        NetBSD 1.3: i386
	NetBSD -current: i386
The relevant sources, binaries, and docs can be found in
        ftp://ftp.coda.cs.cmu.edu/pub/coda/

We intend to come out with new Coda releases often, not daily.  We
don't want to slight any OS/platform not mentioned above.  We are just
limited in our resources as to what we can support internally.  We
will be happy to integrate OpenBSD support as well as other OS
support.  Also, adding platform support should be relatively easy and
we can discuss this.  The only difficulty is that Coda has a light weight
process package.  It does some manipulations in assembler which would
have to be redone for a different platform.

There are several mailing lists @coda.cs.cmu.edu that discuss coda:
coda-announce and linux-coda.  We are going to revise linux-coda to be
OS neutral, since it is mainly Coda we want to discuss.  We appreciate
comments, feedback, bug reports, bug fixes, enhancements, etc.