From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 5 19:40:49 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B1B91065677; Thu, 5 Aug 2010 19:40:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0846A8FC26; Thu, 5 Aug 2010 19:40:49 +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 o75JemNL086243; Thu, 5 Aug 2010 19:40:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o75JemTt086238; Thu, 5 Aug 2010 19:40:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201008051940.o75JemTt086238@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Aug 2010 19:40:48 +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: r210888 - in stable/8/sys: fs/nfsclient nfsclient X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2010 19:40:49 -0000 Author: jhb Date: Thu Aug 5 19:40:48 2010 New Revision: 210888 URL: http://svn.freebsd.org/changeset/base/210888 Log: MFC 210136: Retire the NFS access cache timestamp structure. It was used in VOP_OPEN() to avoid sending multiple ACCESS/GETATTR RPCs during a single open() between VOP_LOOKUP() and VOP_OPEN(). Now we always send the RPC in VOP_LOOKUP() and not VOP_OPEN() in the cases that multiple RPCs could be sent. To preserve the ABI I have left the structure in place, but renamed it to 'n_unused' and just removed the code that updates it. Modified: stable/8/sys/fs/nfsclient/nfs_clport.c stable/8/sys/fs/nfsclient/nfsnode.h stable/8/sys/nfsclient/nfs_subs.c stable/8/sys/nfsclient/nfsnode.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cam/ (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) Modified: stable/8/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clport.c Thu Aug 5 19:30:57 2010 (r210887) +++ stable/8/sys/fs/nfsclient/nfs_clport.c Thu Aug 5 19:40:48 2010 (r210888) @@ -340,7 +340,6 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsnode *np; struct nfsmount *nmp; struct timespec mtime_save; - struct thread *td = curthread; /* * If v_type == VNON it is a new node, so fill in the v_type, @@ -386,14 +385,6 @@ nfscl_loadattrcache(struct vnode **vpp, else vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; np->n_attrstamp = time_second; - /* Timestamp the NFS otw getattr fetch */ - if (td->td_proc) { - np->n_ac_ts_tid = td->td_tid; - np->n_ac_ts_pid = td->td_proc->p_pid; - np->n_ac_ts_syscalls = td->td_syscalls; - } else - bzero(&np->n_ac_ts, sizeof(struct nfs_attrcache_timestamp)); - if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { if (dontshrink && vap->va_size < np->n_size) { Modified: stable/8/sys/fs/nfsclient/nfsnode.h ============================================================================== --- stable/8/sys/fs/nfsclient/nfsnode.h Thu Aug 5 19:30:57 2010 (r210887) +++ stable/8/sys/fs/nfsclient/nfsnode.h Thu Aug 5 19:40:48 2010 (r210888) @@ -68,10 +68,6 @@ struct nfsdmap { #define ndm_cookies ndm_un1.ndmu3_cookies #define ndm4_cookies ndm_un1.ndmu4_cookies -#define n_ac_ts_tid n_ac_ts.nfs_ac_ts_tid -#define n_ac_ts_pid n_ac_ts.nfs_ac_ts_pid -#define n_ac_ts_syscalls n_ac_ts.nfs_ac_ts_syscalls - struct nfs_attrcache_timestamp { lwpid_t nfs_ac_ts_tid; pid_t nfs_ac_ts_pid; @@ -132,7 +128,7 @@ struct nfsnode { u_int32_t n_flag; /* Flag for locking.. */ int n_directio_opens; int n_directio_asyncwr; - struct nfs_attrcache_timestamp n_ac_ts; + struct nfs_attrcache_timestamp n_unused; u_int64_t n_change; /* old Change attribute */ struct nfsv4node *n_v4; /* extra V4 stuff */ }; Modified: stable/8/sys/nfsclient/nfs_subs.c ============================================================================== --- stable/8/sys/nfsclient/nfs_subs.c Thu Aug 5 19:30:57 2010 (r210887) +++ stable/8/sys/nfsclient/nfs_subs.c Thu Aug 5 19:40:48 2010 (r210888) @@ -470,7 +470,6 @@ nfs_loadattrcache(struct vnode **vpp, st u_short vmode; struct timespec mtime, mtime_save; int v3 = NFS_ISV3(vp); - struct thread *td = curthread; int error = 0; md = *mdp; @@ -574,14 +573,6 @@ nfs_loadattrcache(struct vnode **vpp, st vap->va_filerev = 0; } np->n_attrstamp = time_second; - /* Timestamp the NFS otw getattr fetch */ - if (td->td_proc) { - np->n_ac_ts_tid = td->td_tid; - np->n_ac_ts_pid = td->td_proc->p_pid; - np->n_ac_ts_syscalls = td->td_syscalls; - } else - bzero(&np->n_ac_ts, sizeof(struct nfs_attrcache_timestamp)); - if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { if (dontshrink && vap->va_size < np->n_size) { Modified: stable/8/sys/nfsclient/nfsnode.h ============================================================================== --- stable/8/sys/nfsclient/nfsnode.h Thu Aug 5 19:30:57 2010 (r210887) +++ stable/8/sys/nfsclient/nfsnode.h Thu Aug 5 19:40:48 2010 (r210888) @@ -74,10 +74,6 @@ struct nfsdmap { #define ndm_cookies ndm_un1.ndmu3_cookies #define ndm4_cookies ndm_un1.ndmu4_cookies -#define n_ac_ts_tid n_ac_ts.nfs_ac_ts_tid -#define n_ac_ts_pid n_ac_ts.nfs_ac_ts_pid -#define n_ac_ts_syscalls n_ac_ts.nfs_ac_ts_syscalls - struct nfs_attrcache_timestamp { lwpid_t nfs_ac_ts_tid; pid_t nfs_ac_ts_pid; @@ -140,7 +136,7 @@ struct nfsnode { uint32_t n_namelen; int n_directio_opens; int n_directio_asyncwr; - struct nfs_attrcache_timestamp n_ac_ts; + struct nfs_attrcache_timestamp n_unused; }; #define n_atim n_un1.nf_atim