summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorManoj Naik <manoj@almaden.ibm.com>2006-06-09 09:34:25 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-09 09:34:25 -0400
commit830b8e33fe1900b87c8eb7ec5c646117a9f298d6 (patch)
tree8e4aa4c7ecd0485a288254433edf76305852c846 /fs/nfs/nfs4xdr.c
parent361e624f6d8bfbeac53769603d995d47535cfd46 (diff)
downloadlinux-830b8e33fe1900b87c8eb7ec5c646117a9f298d6.tar.gz
linux-830b8e33fe1900b87c8eb7ec5c646117a9f298d6.tar.bz2
linux-830b8e33fe1900b87c8eb7ec5c646117a9f298d6.zip
NFSv4: Define an fs_locations bitmap
This is (similar to getattr bitmap) but includes fs_locations and mounted_on_fileid attributes. Use this bitmap for encoding in fs_locations requests. Note: We can probably do better by requesting locations as part of fsinfo itself. Signed-off-by: Manoj Naik <manoj@almaden.ibm.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 4b6613f61341..646f16da0722 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -731,6 +731,13 @@ static int encode_fsinfo(struct xdr_stream *xdr, const u32* bitmask)
bitmask[1] & nfs4_fsinfo_bitmap[1]);
}
+static int encode_fs_locations(struct xdr_stream *xdr, const u32* bitmask)
+{
+ return encode_getattr_two(xdr,
+ bitmask[0] & nfs4_fs_locations_bitmap[0],
+ bitmask[1] & nfs4_fs_locations_bitmap[1]);
+}
+
static int encode_getfh(struct xdr_stream *xdr)
{
uint32_t *p;
@@ -2030,10 +2037,10 @@ static int nfs4_xdr_enc_fs_locations(struct rpc_rqst *req, uint32_t *p, struct n
goto out;
if ((status = encode_lookup(&xdr, args->name)) != 0)
goto out;
- if ((status = encode_getfattr(&xdr, args->bitmask)) != 0)
+ if ((status = encode_fs_locations(&xdr, args->bitmask)) != 0)
goto out;
/* set up reply
- * toplevel_status + taglen + rescount + OP_PUTFH + status
+ * toplevel_status + OP_PUTFH + status
* + OP_LOOKUP + status + OP_GETATTR + status = 7
*/
replen = (RPC_REPHDRSIZE + auth->au_rslack + 7) << 2;