svn commit: r317615 - projects/pnfs-planb-server/sys/fs/nfsserver

Rick Macklem rmacklem at FreeBSD.org
Mon May 1 00:57:17 UTC 2017


Author: rmacklem
Date: Mon May  1 00:57:15 2017
New Revision: 317615
URL: https://svnweb.freebsd.org/changeset/base/317615

Log:
  Update file attributes upon Close, since the Linux client doesn't always do
  a LayoutCommit operation. There are still cases where the Linux client does
  a Getattr without first doing Close or LayoutCommit. The case I've observed
  is just before a Lock operation on the file. At this point, all you can do
  to get this case to work correctly is set the sysctl vfs.nfsd.pnfsgetdsattr=1.

Modified:
  projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c

Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c	Mon May  1 00:53:07 2017	(r317614)
+++ projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c	Mon May  1 00:57:15 2017	(r317615)
@@ -3142,6 +3142,7 @@ nfsrvd_close(struct nfsrv_descript *nd, 
 	int error = 0;
 	nfsv4stateid_t stateid;
 	nfsquad_t clientid;
+	struct nfsvattr na;
 
 	NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED + NFSX_STATEID);
 	stp->ls_seq = fxdr_unsigned(u_int32_t, *tl++);
@@ -3182,6 +3183,8 @@ nfsrvd_close(struct nfsrv_descript *nd, 
 		nd->nd_clientid.qval = clientid.qval;
 	}
 	nd->nd_repstat = nfsrv_openupdate(vp, stp, clientid, &stateid, nd, p);
+	/* For pNFS, update the attributes. */
+	nfsrv_updatemdsattr(vp, &na, p);
 	vput(vp);
 	if (!nd->nd_repstat) {
 		/*


More information about the svn-src-projects mailing list