summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2017-05-14 00:23:27 +0000
committerrmacklem <rmacklem@FreeBSD.org>2017-05-14 00:23:27 +0000
commit841724cbfd5c6b6552b8d0e3c136eddaf47d84fa (patch)
treefe4d99f5022da5532c08da23413d0960541fd40f
parent6c2a9688d0c906f5227c73b90d295e65da898c4b (diff)
downloadFreeBSD-src-841724cbfd5c6b6552b8d0e3c136eddaf47d84fa.zip
FreeBSD-src-841724cbfd5c6b6552b8d0e3c136eddaf47d84fa.tar.gz
MFC: r317576
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.
-rw-r--r--sys/fs/nfsclient/nfs_clrpcops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c
index 3a35446..f0d1154 100644
--- a/sys/fs/nfsclient/nfs_clrpcops.c
+++ b/sys/fs/nfsclient/nfs_clrpcops.c
@@ -5235,7 +5235,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, vnode_t vp, struct nfsfh *nfhp,
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 {
@@ -5245,7 +5245,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, vnode_t vp, struct nfsfh *nfhp,
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);
}
OpenPOWER on IntegriCloud