aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Tao <[email protected]>2011-07-30 20:52:34 -0400
committerTrond Myklebust <[email protected]>2011-07-31 12:18:15 -0400
commit3557c6c3be5b2ca0b11365db7f8a813253eb520b (patch)
treef0f333f0a331c2ae2b68b73e3a9dc7e8f38feffc
parenta9bae5666d0510ad69bdb437371c9a3e6b770705 (diff)
pnfs: use lwb as layoutcommit length
Using NFS4_MAX_UINT64 will break current protocol. [Needed in v3.0] CC: Stable Tree <[email protected]> Signed-off-by: Peng Tao <[email protected]> Signed-off-by: Jim Rees <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
-rw-r--r--fs/nfs/nfs4xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index c191a9baa422..b851b560a6f8 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1916,7 +1916,7 @@ encode_layoutcommit(struct xdr_stream *xdr,
*p++ = cpu_to_be32(OP_LAYOUTCOMMIT);
/* Only whole file layouts */
p = xdr_encode_hyper(p, 0); /* offset */
- p = xdr_encode_hyper(p, NFS4_MAX_UINT64); /* length */
+ p = xdr_encode_hyper(p, args->lastbytewritten + 1); /* length */
*p++ = cpu_to_be32(0); /* reclaim */
p = xdr_encode_opaque_fixed(p, args->stateid.data, NFS4_STATEID_SIZE);
*p++ = cpu_to_be32(1); /* newoffset = TRUE */