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

Robert Watson rwatson at FreeBSD.org
Fri Mar 14 10:17:01 PDT 2008


rwatson     2008-03-14 17:17:01 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7)
    sys/fs/coda          cnode.h coda_subr.c coda_vnops.c 
  Log:
  Merge cnode.h:1.27, coda_subr.c:1.37, coda_vnops.c:1.95 from HEAD to
  RELENG_7:
  
    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.
  
  Revision   Changes    Path
  1.21.2.6   +4 -0      src/sys/fs/coda/cnode.h
  1.33.2.4   +63 -8     src/sys/fs/coda/coda_subr.c
  1.76.2.11  +51 -21    src/sys/fs/coda/coda_vnops.c


More information about the cvs-all mailing list