Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Mar 2012 20:52:00 +0000 (UTC)
From:      John Baldwin <jhb@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: r233325 - in stable/8/sys: i386/conf nfsclient
Message-ID:  <201203222052.q2MKq0iM040889@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Mar 22 20:52:00 2012
New Revision: 233325
URL: http://svn.freebsd.org/changeset/base/233325

Log:
  MFC 232116:
  Adjust the nfs_skip_wcc_data_onerr setting so that it does not block
  post-op attributes for ENOENT errors now that the name caching logic
  depends on working post-op attributes.

Modified:
  stable/8/sys/nfsclient/nfs_krpc.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/nfsclient/nfs_krpc.c
==============================================================================
--- stable/8/sys/nfsclient/nfs_krpc.c	Thu Mar 22 20:51:35 2012	(r233324)
+++ stable/8/sys/nfsclient/nfs_krpc.c	Thu Mar 22 20:52:00 2012	(r233325)
@@ -603,13 +603,15 @@ tryagain:
 		if (error == ESTALE)
 			nfs_purgecache(vp);
 		/*
-		 * Skip wcc data on NFS errors for now.  NetApp filers
-		 * return corrupt postop attrs in the wcc data for NFS
-		 * err EROFS.  Not sure if they could return corrupt
-		 * postop attrs for others errors.
+		 * Skip wcc data on non-ENOENT NFS errors for now.
+		 * NetApp filers return corrupt postop attrs in the
+		 * wcc data for NFS err EROFS.  Not sure if they could
+		 * return corrupt postop attrs for others errors.
+		 * Blocking ENOENT post-op attributes breaks negative
+		 * name caching, so always allow it through.
 		 */
 		if ((nmp->nm_flag & NFSMNT_NFSV3) &&
-		    !nfs_skip_wcc_data_onerr) {
+		    (!nfs_skip_wcc_data_onerr || error == ENOENT)) {
 			*mrp = mrep;
 			*mdp = md;
 			*dposp = dpos;



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