summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2014-11-17 04:30:36 +0300
committerTom Haynes <loghyr@primarydata.com>2015-02-03 22:06:49 +0300
commit15eb67c15342d212b0c8a540b6d6bd2dfad52a63 (patch)
treed757ddb7e60cf5eb6bbb796cdb66626232f77beb /fs/nfs/nfs4xdr.c
parentceb11e13df3e78b450730c615037133c57b90c3b (diff)
downloadlinux-15eb67c15342d212b0c8a540b6d6bd2dfad52a63.tar.xz
nfs41: add range to layoutreturn args
So that callers can specify which range to return. Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 3c3ff633dd17..56d4c91a48f3 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -2012,11 +2012,11 @@ encode_layoutreturn(struct xdr_stream *xdr,
p = reserve_space(xdr, 16);
*p++ = cpu_to_be32(0); /* reclaim. always 0 for now */
*p++ = cpu_to_be32(args->layout_type);
- *p++ = cpu_to_be32(args->iomode);
+ *p++ = cpu_to_be32(args->range.iomode);
*p = cpu_to_be32(RETURN_FILE);
p = reserve_space(xdr, 16);
- p = xdr_encode_hyper(p, 0);
- p = xdr_encode_hyper(p, NFS4_MAX_UINT64);
+ p = xdr_encode_hyper(p, args->range.offset);
+ p = xdr_encode_hyper(p, args->range.length);
spin_lock(&args->inode->i_lock);
encode_nfs4_stateid(xdr, &args->stateid);
spin_unlock(&args->inode->i_lock);