Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 May 2012 20:28:43 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r235417 - in stable/8/sys: fs/nfsclient i386/conf
Message-ID:  <201205132028.q4DKShXO099107@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sun May 13 20:28:43 2012
New Revision: 235417
URL: http://svn.freebsd.org/changeset/base/235417

Log:
  MFC: r234742
  It was reported via email that some non-FreeBSD NFS servers
  do not include file attributes in the reply to an NFS create RPC
  under certain circumstances.
  This resulted in a vnode of type VNON that was not usable.
  This patch adds an NFS getattr RPC to nfs_create() for this case,
  to fix the problem. It was tested by the person that reported
  the problem and confirmed to fix this case for their server.

Modified:
  stable/8/sys/fs/nfsclient/nfs_clvnops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (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/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Sun May 13 19:32:49 2012	(r235416)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Sun May 13 20:28:43 2012	(r235417)
@@ -1494,7 +1494,10 @@ again:
 		(void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1);
 	if (!error) {
 		newvp = NFSTOV(np);
-		if (attrflag)
+		if (attrflag == 0)
+			error = nfsrpc_getattr(newvp, cnp->cn_cred,
+			    cnp->cn_thread, &nfsva, NULL);
+		if (error == 0)
 			error = nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL,
 			    0, 1);
 	}



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