aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2009-04-01 09:23:25 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 17:11:38 -0400
commitd49433e1e3bb144a5752ce2a8ba1139dc519df1a (patch)
tree65ec427fcab5fffedff5f5dced68c9424d2e204e /fs/nfs
parent2d9b9ec344b19b7b65c732b7000114df57684140 (diff)
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')
-rw-r--r--fs/nfs/callback.h4
-rw-r--r--fs/nfs/callback_proc.c28
2 files changed, 32 insertions, 0 deletions
diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h
index 2b933ce064dd..576f51f4dc52 100644
--- a/fs/nfs/callback.h
+++ b/fs/nfs/callback.h
@@ -103,6 +103,9 @@ struct cb_sequenceres {
103 uint32_t csr_target_highestslotid; 103 uint32_t csr_target_highestslotid;
104}; 104};
105 105
106extern unsigned nfs4_callback_sequence(struct cb_sequenceargs *args,
107 struct cb_sequenceres *res);
108
106#endif /* CONFIG_NFS_V4_1 */ 109#endif /* CONFIG_NFS_V4_1 */
107 110
108extern __be32 nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *res); 111extern __be32 nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *res);
@@ -119,6 +122,7 @@ extern void nfs_callback_down(int minorversion);
119 * of slots for the backchannel. 122 * of slots for the backchannel.
120 */ 123 */
121#define NFS41_BC_MIN_CALLBACKS 1 124#define NFS41_BC_MIN_CALLBACKS 1
125#define NFS41_BC_MAX_CALLBACKS 1
122 126
123extern unsigned int nfs_callback_set_tcpport; 127extern unsigned int nfs_callback_set_tcpport;
124extern unsigned short nfs_callback_tcpport; 128extern unsigned short nfs_callback_tcpport;
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:
101 dprintk("%s: exit with status = %d\n", __func__, ntohl(res)); 101 dprintk("%s: exit with status = %d\n", __func__, ntohl(res));
102 return res; 102 return res;
103} 103}
104
105#if defined(CONFIG_NFS_V4_1)
106
107/* FIXME: validate args->cbs_{sequence,slot}id */
108/* FIXME: referring calls should be processed */
109unsigned nfs4_callback_sequence(struct cb_sequenceargs *args,
110 struct cb_sequenceres *res)
111{
112 int i;
113 unsigned status = 0;
114
115 for (i = 0; i < args->csa_nrclists; i++)
116 kfree(args->csa_rclists[i].rcl_refcalls);
117 kfree(args->csa_rclists);
118
119 memcpy(&res->csr_sessionid, &args->csa_sessionid,
120 sizeof(res->csr_sessionid));
121 res->csr_sequenceid = args->csa_sequenceid;
122 res->csr_slotid = args->csa_slotid;
123 res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
124 res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
125
126 dprintk("%s: exit with status = %d\n", __func__, ntohl(status));
127 res->csr_status = status;
128 return status;
129}
130
131#endif /* CONFIG_NFS_V4_1 */