From owner-svn-src-all@FreeBSD.ORG Tue Jul 12 21:01:10 2011 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 3AD3A1065672; Tue, 12 Jul 2011 21:01:10 +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 29C388FC08; Tue, 12 Jul 2011 21:01:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6CL1A8m055279; Tue, 12 Jul 2011 21:01:10 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6CL1AW4055275; Tue, 12 Jul 2011 21:01:10 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201107122101.p6CL1AW4055275@svn.freebsd.org> From: Rick Macklem Date: Tue, 12 Jul 2011 21:01:10 +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: r223968 - in stable/8/sys/fs: nfs 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: Tue, 12 Jul 2011 21:01:10 -0000 Author: rmacklem Date: Tue Jul 12 21:01:09 2011 New Revision: 223968 URL: http://svn.freebsd.org/changeset/base/223968 Log: MFC: r223657 Fix the new NFSv4 client so that it doesn't fill the cached mode attribute in as 0 when doing writes. The change adds the Mode attribute plus the others except Owner and Owner_group to the list requested by the NFSv4 Write Operation. This fixed a problem where an executable file built by "cc" would get mode 0111 instead of 0755 for some NFSv4 servers. Found at the recent NFSv4 interoperability Bakeathon. Modified: stable/8/sys/fs/nfs/nfsproto.h stable/8/sys/fs/nfsclient/nfs_clport.c stable/8/sys/fs/nfsclient/nfs_clrpcops.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) Modified: stable/8/sys/fs/nfs/nfsproto.h ============================================================================== --- stable/8/sys/fs/nfs/nfsproto.h Tue Jul 12 20:38:42 2011 (r223967) +++ stable/8/sys/fs/nfs/nfsproto.h Tue Jul 12 21:01:09 2011 (r223968) @@ -826,15 +826,24 @@ struct nfsv3_sattr { * NFSATTRBIT_WRITEGETATTR0 - bits 0<->31 */ #define NFSATTRBIT_WRITEGETATTR0 \ - (NFSATTRBM_CHANGE | \ + (NFSATTRBM_SUPPORTEDATTRS | \ + NFSATTRBM_TYPE | \ + NFSATTRBM_CHANGE | \ NFSATTRBM_SIZE | \ - NFSATTRBM_FSID) + NFSATTRBM_FSID | \ + NFSATTRBM_FILEID | \ + NFSATTRBM_MAXREAD) /* * NFSATTRBIT_WRITEGETATTR1 - bits 32<->63 */ #define NFSATTRBIT_WRITEGETATTR1 \ - (NFSATTRBM_TIMEMETADATA | \ + (NFSATTRBM_MODE | \ + NFSATTRBM_NUMLINKS | \ + NFSATTRBM_RAWDEV | \ + NFSATTRBM_SPACEUSED | \ + NFSATTRBM_TIMEACCESS | \ + NFSATTRBM_TIMEMETADATA | \ NFSATTRBM_TIMEMODIFY) /* Modified: stable/8/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clport.c Tue Jul 12 20:38:42 2011 (r223967) +++ stable/8/sys/fs/nfsclient/nfs_clport.c Tue Jul 12 21:01:09 2011 (r223968) @@ -366,6 +366,7 @@ nfscl_loadattrcache(struct vnode **vpp, np->n_vattr.na_mtime = nap->na_mtime; np->n_vattr.na_ctime = nap->na_ctime; np->n_vattr.na_fsid = nap->na_fsid; + np->n_vattr.na_mode = nap->na_mode; } else { NFSBCOPY((caddr_t)nap, (caddr_t)&np->n_vattr, sizeof (struct nfsvattr)); Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Tue Jul 12 20:38:42 2011 (r223967) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Tue Jul 12 21:01:09 2011 (r223968) @@ -1527,8 +1527,8 @@ nfsrpc_writerpc(vnode_t vp, struct uio * * deadlock, is that the upcall times out and allows * the write to complete. However, progress is so slow * that it might just as well be deadlocked. - * So, we just get the attributes that change with each - * write Op. + * As such, we get the rest of the attributes, but not + * Owner or Owner_group. * nb: nfscl_loadattrcache() needs to be told that these * partial attributes from a write rpc are being * passed in, via a argument flag.