cvs commit: src/sys/fs/coda cnode.h coda_subr.c coda_vnops.c

Robert Watson rwatson at
Wed Feb 13 07:45:12 PST 2008

rwatson     2008-02-13 15:45:12 UTC

  FreeBSD src repository

  Modified files:
    sys/fs/coda          cnode.h coda_subr.c coda_vnops.c 
  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
  MFC after:      1 month
  Revision  Changes    Path
  1.27      +4 -0      src/sys/fs/coda/cnode.h
  1.37      +63 -8     src/sys/fs/coda/coda_subr.c
  1.95      +51 -21    src/sys/fs/coda/coda_vnops.c

More information about the cvs-src mailing list