Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 May 2017 00:57:16 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r317615 - projects/pnfs-planb-server/sys/fs/nfsserver
Message-ID:  <201705010057.v410vGSq062058@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {
 		/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705010057.v410vGSq062058>