From owner-svn-src-all@FreeBSD.ORG Sun May 23 02:55:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6841106566C; Sun, 23 May 2010 02:55:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9468E8FC12; Sun, 23 May 2010 02:55:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4N2txV3046764; Sun, 23 May 2010 02:55:59 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4N2tx3U046762; Sun, 23 May 2010 02:55:59 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005230255.o4N2tx3U046762@svn.freebsd.org> From: Rick Macklem Date: Sun, 23 May 2010 02:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208432 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2010 02:55:59 -0000 Author: rmacklem Date: Sun May 23 02:55:59 2010 New Revision: 208432 URL: http://svn.freebsd.org/changeset/base/208432 Log: MFC: r208254 Allow the experimental NFSv4 client to use cached attributes when a write delegation is held. Also, add a missing mtx_unlock() call for the ACL debugging code. Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clsubs.c Sun May 23 02:40:04 2010 (r208431) +++ stable/8/sys/fs/nfsclient/nfs_clsubs.c Sun May 23 02:55:59 2010 (r208432) @@ -188,11 +188,12 @@ ncl_getattrcache(struct vnode *vp, struc struct nfsnode *np; struct vattr *vap; struct nfsmount *nmp; - int timeo; + int timeo, mustflush; np = VTONFS(vp); vap = &np->n_vattr.na_vattr; nmp = VFSTONFS(vp->v_mount); + mustflush = nfscl_mustflush(vp); /* must be before mtx_lock() */ #ifdef NFS_ACDEBUG mtx_lock(&Giant); /* ncl_printf() */ #endif @@ -228,9 +229,13 @@ ncl_getattrcache(struct vnode *vp, struc (time_second - np->n_attrstamp), timeo); #endif - if ((time_second - np->n_attrstamp) >= timeo) { + if ((time_second - np->n_attrstamp) >= timeo && + mustflush != 0) { newnfsstats.attrcache_misses++; mtx_unlock(&np->n_mtx); +#ifdef NFS_ACDEBUG + mtx_unlock(&Giant); /* ncl_printf() */ +#endif return( ENOENT); } newnfsstats.attrcache_hits++;