Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Feb 2012 17:26:06 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r232116 - head/sys/nfsclient
Message-ID:  <201202241726.q1OHQ6cQ072383@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Feb 24 17:26:06 2012
New Revision: 232116
URL: http://svn.freebsd.org/changeset/base/232116

Log:
  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.
  
  MFC after:	2 weeks

Modified:
  head/sys/nfsclient/nfs_krpc.c

Modified: head/sys/nfsclient/nfs_krpc.c
==============================================================================
--- head/sys/nfsclient/nfs_krpc.c	Fri Feb 24 15:34:36 2012	(r232115)
+++ head/sys/nfsclient/nfs_krpc.c	Fri Feb 24 17:26:06 2012	(r232116)
@@ -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?201202241726.q1OHQ6cQ072383>