Author: jhb
Date: Thu Mar 22 20:51:35 2012
New Revision: 233324
URL: http://svn.freebsd.org/changeset/base/233324

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/9/sys/nfsclient/nfs_krpc.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)

Modified: stable/9/sys/nfsclient/nfs_krpc.c
==============================================================================
--- stable/9/sys/nfsclient/nfs_krpc.c   Thu Mar 22 20:34:26 2012        
(r233323)
+++ stable/9/sys/nfsclient/nfs_krpc.c   Thu Mar 22 20:51:35 2012        
(r233324)
@@ -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;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to