diff options
author | mohans <mohans@FreeBSD.org> | 2006-12-11 19:54:25 +0000 |
---|---|---|
committer | mohans <mohans@FreeBSD.org> | 2006-12-11 19:54:25 +0000 |
commit | a3a728eabb31b5ce3771f41c9b9b0bab5dbde992 (patch) | |
tree | 5fa4bd035425ec3a96840b5d1331e247e3a41b73 /sys/nfsclient | |
parent | 3242485ea4295f5df79bee415f7ea4ab1e182711 (diff) | |
download | FreeBSD-src-a3a728eabb31b5ce3771f41c9b9b0bab5dbde992.zip FreeBSD-src-a3a728eabb31b5ce3771f41c9b9b0bab5dbde992.tar.gz |
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
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/nfs_socket.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index 1e1aa5a..6036050 100644 --- a/sys/nfsclient/nfs_socket.c +++ b/sys/nfsclient/nfs_socket.c @@ -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 @@ tryagain: */ 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; |