From owner-svn-src-head@FreeBSD.ORG Sun Jul 18 00:24:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 075BC1065670; Sun, 18 Jul 2010 00:24:02 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB46F8FC18; Sun, 18 Jul 2010 00:24:01 +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 o6I0O1up084231; Sun, 18 Jul 2010 00:24:01 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I0O1rC084228; Sun, 18 Jul 2010 00:24:01 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007180024.o6I0O1rC084228@svn.freebsd.org> From: Rick Macklem Date: Sun, 18 Jul 2010 00:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210201 - in head/sys/fs: nfs nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 00:24:02 -0000 Author: rmacklem Date: Sun Jul 18 00:24:01 2010 New Revision: 210201 URL: http://svn.freebsd.org/changeset/base/210201 Log: Change the nfscl_mustflush() function in the experimental NFSv4 client to return a boolean_t in order to make it more compatible with style(9). MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clstate.c head/sys/fs/nfsclient/nfs_clsubs.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Sat Jul 17 18:35:39 2010 (r210200) +++ head/sys/fs/nfs/nfs_var.h Sun Jul 18 00:24:01 2010 (r210201) @@ -467,7 +467,7 @@ void nfscl_docb(struct nfsrv_descript *, void nfscl_releasealllocks(struct nfsclclient *, vnode_t, NFSPROC_T *); int nfscl_lockt(vnode_t, struct nfsclclient *, u_int64_t, u_int64_t, struct flock *, NFSPROC_T *); -int nfscl_mustflush(vnode_t); +boolean_t nfscl_mustflush(vnode_t); int nfscl_nodeleg(vnode_t, int); int nfscl_removedeleg(vnode_t, NFSPROC_T *, nfsv4stateid_t *); int nfscl_getref(struct nfsmount *); Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Sat Jul 17 18:35:39 2010 (r210200) +++ head/sys/fs/nfsclient/nfs_clstate.c Sun Jul 18 00:24:01 2010 (r210201) @@ -3735,7 +3735,7 @@ nfscl_tryclose(struct nfsclopen *op, str * to the server. This might be a big performance win in some environments. * (Not useful until the client does caching on local stable storage.) */ -APPLESTATIC int +APPLESTATIC boolean_t nfscl_mustflush(vnode_t vp) { struct nfsclclient *clp; @@ -3746,12 +3746,12 @@ nfscl_mustflush(vnode_t vp) np = VTONFS(vp); nmp = VFSTONFS(vnode_mount(vp)); if (!NFSHASNFSV4(nmp)) - return (1); + return (TRUE); NFSLOCKCLSTATE(); clp = nfscl_findcl(nmp); if (clp == NULL) { NFSUNLOCKCLSTATE(); - return (1); + return (TRUE); } dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len); if (dp != NULL && (dp->nfsdl_flags & (NFSCLDL_WRITE | NFSCLDL_RECALL)) @@ -3759,10 +3759,10 @@ nfscl_mustflush(vnode_t vp) (dp->nfsdl_sizelimit >= np->n_size || !NFSHASSTRICT3530(nmp))) { NFSUNLOCKCLSTATE(); - return (0); + return (FALSE); } NFSUNLOCKCLSTATE(); - return (1); + return (TRUE); } /* Modified: head/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clsubs.c Sat Jul 17 18:35:39 2010 (r210200) +++ head/sys/fs/nfsclient/nfs_clsubs.c Sun Jul 18 00:24:01 2010 (r210201) @@ -188,7 +188,8 @@ ncl_getattrcache(struct vnode *vp, struc struct nfsnode *np; struct vattr *vap; struct nfsmount *nmp; - int timeo, mustflush; + int timeo; + boolean_t mustflush; np = VTONFS(vp); vap = &np->n_vattr.na_vattr; @@ -230,7 +231,7 @@ ncl_getattrcache(struct vnode *vp, struc #endif if ((time_second - np->n_attrstamp) >= timeo && - (mustflush != 0 || np->n_attrstamp == 0)) { + (mustflush || np->n_attrstamp == 0)) { newnfsstats.attrcache_misses++; mtx_unlock(&np->n_mtx); #ifdef NFS_ACDEBUG