From owner-cvs-src@FreeBSD.ORG Fri Mar 14 17:17:01 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F400106566B; Fri, 14 Mar 2008 17:17:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 521438FC27; Fri, 14 Mar 2008 17:17:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2EHH16b011643; Fri, 14 Mar 2008 17:17:01 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2EHH1QA011642; Fri, 14 Mar 2008 17:17:01 GMT (envelope-from rwatson) Message-Id: <200803141717.m2EHH1QA011642@repoman.freebsd.org> From: Robert Watson Date: Fri, 14 Mar 2008 17:17:01 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_7 Cc: Subject: cvs commit: src/sys/fs/coda cnode.h coda_subr.c coda_vnops.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 17:17:01 -0000 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