svn commit: r356188 - stable/12/sys/fs/nfs

Rick Macklem rmacklem at FreeBSD.org
Sun Dec 29 23:48:49 UTC 2019


Author: rmacklem
Date: Sun Dec 29 23:48:48 2019
New Revision: 356188
URL: https://svnweb.freebsd.org/changeset/base/356188

Log:
  MFC: r355509
  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.

Modified:
  stable/12/sys/fs/nfs/nfs_commonkrpc.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/fs/nfs/nfs_commonkrpc.c
==============================================================================
--- stable/12/sys/fs/nfs/nfs_commonkrpc.c	Sun Dec 29 21:46:50 2019	(r356187)
+++ stable/12/sys/fs/nfs/nfs_commonkrpc.c	Sun Dec 29 23:48:48 2019	(r356188)
@@ -920,7 +920,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);


More information about the svn-src-all mailing list