Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jul 2011 20:53:28 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r224117 - head/sys/fs/nfs
Message-ID:  <201107162053.p6GKrSJ3043891@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107162053.p6GKrSJ3043891>