diff options
author | Benny Halevy <bhalevy@panasas.com> | 2009-04-01 15:23:25 +0200 |
---|---|---|
committer | Benny Halevy <bhalevy@panasas.com> | 2009-06-17 23:11:38 +0200 |
commit | d49433e1e3bb144a5752ce2a8ba1139dc519df1a (patch) | |
tree | 65ec427fcab5fffedff5f5dced68c9424d2e204e /fs/nfs/callback_proc.c | |
parent | nfs41: cb_sequence protocol level data structures (diff) | |
download | linux-d49433e1e3bb144a5752ce2a8ba1139dc519df1a.tar.xz linux-d49433e1e3bb144a5752ce2a8ba1139dc519df1a.zip |
nfs41: cb_sequence proc implementation
Currently, just free up any referring calls information.
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfs41: fix csr_{,target}highestslotid]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r-- | fs/nfs/callback_proc.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index f7e83e23cf9f..f731bbe7ac6a 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -101,3 +101,31 @@ out: dprintk("%s: exit with status = %d\n", __func__, ntohl(res)); return res; } + +#if defined(CONFIG_NFS_V4_1) + +/* FIXME: validate args->cbs_{sequence,slot}id */ +/* FIXME: referring calls should be processed */ +unsigned nfs4_callback_sequence(struct cb_sequenceargs *args, + struct cb_sequenceres *res) +{ + int i; + unsigned status = 0; + + for (i = 0; i < args->csa_nrclists; i++) + kfree(args->csa_rclists[i].rcl_refcalls); + kfree(args->csa_rclists); + + memcpy(&res->csr_sessionid, &args->csa_sessionid, + sizeof(res->csr_sessionid)); + res->csr_sequenceid = args->csa_sequenceid; + res->csr_slotid = args->csa_slotid; + res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1; + res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1; + + dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); + res->csr_status = status; + return status; +} + +#endif /* CONFIG_NFS_V4_1 */ |