svn commit: r224117 - head/sys/fs/nfs

[ Available lists | Index of svn-src-head | Month of Jul 2011 | Week of 16 Jul 2011 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Rick Macklem <rmacklem@FreeBSD.org>
Date
16 Jul 2011 20:53:28
Subject
svn commit: r224117 - head/sys/fs/nfs
Message-ID
201107162053.p6GKrSJ3043891@svn.freebsd.org


[ Hide this part ]
Author: rmacklem
Date: Sat Jul 16 20:53:27 2011
New Revision: 224117
URL: http://svn.freebsd.org/changeset/base/224117

Log:
The new NFSv4 client handled NFSERR_GRACE as a fatal error
for the remove and rename operations. Some NFSv4 servers will
report NFSERR_GRACE for these operations. This patch changes
the behaviour of the client so that it handles NFSERR_GRACE
like NFSERR_DELAY for non-state related operations like
remove and rename. It also exempts the delegreturn operation
from handling within newnfs_request() for NFSERR_DELAY/NFSERR_GRACE
so that it can handle NFSERR_GRACE in the same manner as before.
This problem was resolved thanks to discussion with bfields at fieldses.org.
The problem was identified at the recent NFSv4 ineroperability
bakeathon.

MFC after: 2 weeks

Modified:
head/sys/fs/nfs/nfs_commonkrpc.c

Modified: head/sys/fs/nfs/nfs_commonkrpc.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonkrpc.c Sat Jul 16 20:34:02 2011 (r224116)
+++ head/sys/fs/nfs/nfs_commonkrpc.c Sat Jul 16 20:53:27 2011 (r224117)
@@ -715,8 +715,10 @@ tryagain:
NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
nd->nd_repstat = fxdr_unsigned(u_int32_t, *tl);
if (nd->nd_repstat != 0) {
- if ((nd->nd_repstat == NFSERR_DELAY &&
+ if (((nd->nd_repstat == NFSERR_DELAY ||
+ nd->nd_repstat == NFSERR_GRACE) &&
(nd->nd_flag & ND_NFSV4) &&
+ nd->nd_procnum != NFSPROC_DELEGRETURN &&
nd->nd_procnum != NFSPROC_SETATTR &&
nd->nd_procnum != NFSPROC_READ &&
nd->nd_procnum != NFSPROC_WRITE &&

Elapsed time: 0.105 seconds