NetApp filers return corrupt post op attrs in the wcc on NFS error responses.

This is easy to reproduce for EROFS. I am not sure if the attrs can be corrupt
for other NFS error responses. For now, disabling wcc pre-op attr checks and
post-op attr loads on NFS errors (sysctl'ed).
Reported by: Kris Kennaway
This commit is contained in:
Mohan Srinivasan 2006-12-11 19:54:25 +00:00
parent 4ed06071e6
commit 7f3a6e42c9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165104

View File

@ -84,6 +84,7 @@ static int nfs_realign_count;
static int nfs_bufpackets = 4;
static int nfs_reconnects;
static int nfs3_jukebox_delay = 10;
static int nfs_skip_wcc_data_onerr = 1;
SYSCTL_DECL(_vfs_nfs);
@ -94,6 +95,7 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, reconnects, CTLFLAG_RD, &nfs_reconnects, 0,
"number of times the nfs client has had to reconnect");
SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs3_jukebox_delay, CTLFLAG_RW, &nfs3_jukebox_delay, 0,
"number of seconds to delay a retry after receiving EJUKEBOX");
SYSCTL_INT(_vfs_nfs, OID_AUTO, skip_wcc_data_onerr, CTLFLAG_RW, &nfs_skip_wcc_data_onerr, 0, "");
/*
* There is a congestion window for outstanding rpcs maintained per mount
@ -1304,7 +1306,12 @@ nfs_request(struct vnode *vp, struct mbuf *mrest, int procnum,
*/
if (error == ESTALE)
cache_purge(vp);
if (nmp->nm_flag & NFSMNT_NFSV3) {
/*
* 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.
*/
if ((nmp->nm_flag & NFSMNT_NFSV3) && !nfs_skip_wcc_data_onerr) {
*mrp = mrep;
*mdp = md;
*dposp = dpos;