Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Oct 2019 04:44:17 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r354061 - projects/nfsv42/sys/fs/nfsserver
Message-ID:  <201910250444.x9P4iH0Y043331@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Fri Oct 25 04:44:17 2019
New Revision: 354061
URL: https://svnweb.freebsd.org/changeset/base/354061

Log:
  Return the correct error for Seek at EOF.
  
  The Linux NFSv4.2 client expects an NFSERR_NXIO error to be returned
  when a NFS4_CONTENT_DATA request with sa_offset == file_size is done for Seek.
  (This is not actually what RFC-7862 says is the correct reply for this
  operation request, so it is only done when vfs.nfsd.linux42server is set.)
  Anyhow, without this patch the code erroeously returned NFSERR_INVAL.

Modified:
  projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c

Modified: projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Oct 25 01:10:08 2019	(r354060)
+++ projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Oct 25 04:44:17 2019	(r354061)
@@ -5478,7 +5478,7 @@ nfsrvd_seek(struct nfsrv_descript *nd, __unused int is
 	vrele(vp);
 	if (nd->nd_repstat == 0 && eof && content == NFSV4CONTENT_DATA &&
 	    nfsrv_linux42server != 0)
-		nd->nd_repstat = NFSERR_INVAL;
+		nd->nd_repstat = NFSERR_NXIO;
 	if (nd->nd_repstat == 0) {
 		NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED + NFSX_HYPER);
 		if (eof)



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