Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Apr 2017 00:34:53 +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: r317576 - head/sys/fs/nfsclient
Message-ID:  <201704290034.v3T0Yrh2049443@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sat Apr 29 00:34:53 2017
New Revision: 317576
URL: https://svnweb.freebsd.org/changeset/base/317576

Log:
  Modify the NFSv4.1/pNFS client to ask for a maximum length of layout.
  
  The code specified the length of a layout as INT64_MAX instead of
  UINT64_MAX. This could result in getting a layout for less than the
  full file for extremely large files. Although having little practical
  effect, this patch corrects this in the code.
  Detected during recent testing of the pNFS server.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsclient/nfs_clrpcops.c

Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clrpcops.c	Fri Apr 28 23:40:53 2017	(r317575)
+++ head/sys/fs/nfsclient/nfs_clrpcops.c	Sat Apr 29 00:34:53 2017	(r317576)
@@ -5238,7 +5238,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v
 			stateid.other[1] = stateidp->other[1];
 			stateid.other[2] = stateidp->other[2];
 			error = nfsrpc_layoutget(nmp, nfhp->nfh_fh,
-			    nfhp->nfh_len, iomode, (uint64_t)0, INT64_MAX,
+			    nfhp->nfh_len, iomode, (uint64_t)0, UINT64_MAX,
 			    (uint64_t)0, layoutlen, &stateid, &retonclose,
 			    &flh, cred, p, NULL);
 		} else {
@@ -5248,7 +5248,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v
 			stateid.other[1] = lyp->nfsly_stateid.other[1];
 			stateid.other[2] = lyp->nfsly_stateid.other[2];
 			error = nfsrpc_layoutget(nmp, nfhp->nfh_fh,
-			    nfhp->nfh_len, iomode, off, INT64_MAX,
+			    nfhp->nfh_len, iomode, off, UINT64_MAX,
 			    (uint64_t)0, layoutlen, &stateid, &retonclose,
 			    &flh, cred, p, NULL);
 		}



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