Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Dec 2019 00:06:00 +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: r355509 - head/sys/fs/nfs
Message-ID:  <201912080006.xB8060Da062575@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sun Dec  8 00:06:00 2019
New Revision: 355509
URL: https://svnweb.freebsd.org/changeset/base/355509

Log:
  Fix kernel handling of a NFSERR_MINORVERSMISMATCH NFSv4 server reply.
  
  When an NFSv4 server replies NFSERR_MINORVERSMISMATCH, it does not generate
  a status result for the first operation in the compound. Without this
  patch, this will result in a bogus EBADXDR error return.
  Returning EBADXDR is relatively harmless, but a correct reply of
  NFSERR_MINORVERSMISMATCH is needed by the pNFS client to select the correct
  minor version to use for a File Layout DS now that there can be NFSv4.2
  DS servers.
  
  mount_nfs.c still needs to be fixed for this, although how the mount fails
  is only useful to help sysadmins isolate why a mount fails.
  
  Found during testing of the NFSv4.2 client and server.
  
  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	Sun Dec  8 00:02:36 2019	(r355508)
+++ head/sys/fs/nfs/nfs_commonkrpc.c	Sun Dec  8 00:06:00 2019	(r355509)
@@ -918,7 +918,8 @@ tryagain:
 		 * Get rid of the tag, return count and SEQUENCE result for
 		 * NFSv4.
 		 */
-		if ((nd->nd_flag & ND_NFSV4) != 0) {
+		if ((nd->nd_flag & ND_NFSV4) != 0 && nd->nd_repstat !=
+		    NFSERR_MINORVERMISMATCH) {
 			NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
 			i = fxdr_unsigned(int, *tl);
 			error = nfsm_advance(nd, NFSM_RNDUP(i), -1);



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