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
This commit is contained in:
John Baldwin 2012-02-24 17:26:06 +00:00
parent 0e7ed5d666
commit 52c746eacc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=232116

View File

@ -603,13 +603,15 @@ nfs_request(struct vnode *vp, struct mbuf *mreq, int procnum,
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;