aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/lockd/debug.h10
-rw-r--r--include/linux/lockd/lockd.h6
-rw-r--r--include/linux/nfs3.h3
-rw-r--r--include/linux/nfs_fs_sb.h15
-rw-r--r--include/linux/nfs_xdr.h6
-rw-r--r--include/linux/sunrpc/auth.h8
-rw-r--r--include/linux/sunrpc/bc_xprt.h15
-rw-r--r--include/linux/sunrpc/clnt.h4
-rw-r--r--include/linux/sunrpc/svc.h2
-rw-r--r--include/linux/sunrpc/svc_xprt.h1
-rw-r--r--include/linux/sunrpc/xdr.h10
11 files changed, 50 insertions, 30 deletions
diff --git a/include/linux/lockd/debug.h b/include/linux/lockd/debug.h
index 34b2b7f33c3b..257d3779f2ab 100644
--- a/include/linux/lockd/debug.h
+++ b/include/linux/lockd/debug.h
@@ -44,14 +44,4 @@
44#define NLMDBG_XDR 0x0100 44#define NLMDBG_XDR 0x0100
45#define NLMDBG_ALL 0x7fff 45#define NLMDBG_ALL 0x7fff
46 46
47
48/*
49 * Support for printing NLM cookies in dprintk()
50 */
51#ifdef RPC_DEBUG
52struct nlm_cookie;
53/* Call this function with the BKL held (it uses a static buffer) */
54extern const char *nlmdbg_cookie2a(const struct nlm_cookie *);
55#endif
56
57#endif /* LINUX_LOCKD_DEBUG_H */ 47#endif /* LINUX_LOCKD_DEBUG_H */
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index 2dee05e5119a..ff9abff55aa0 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -202,9 +202,9 @@ extern u32 nsm_local_state;
202 * Lockd client functions 202 * Lockd client functions
203 */ 203 */
204struct nlm_rqst * nlm_alloc_call(struct nlm_host *host); 204struct nlm_rqst * nlm_alloc_call(struct nlm_host *host);
205void nlm_release_call(struct nlm_rqst *);
206int nlm_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *); 205int nlm_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *);
207int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *); 206int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *);
207void nlmclnt_release_call(struct nlm_rqst *);
208struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl); 208struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl);
209void nlmclnt_finish_block(struct nlm_wait *block); 209void nlmclnt_finish_block(struct nlm_wait *block);
210int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout); 210int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout);
@@ -223,13 +223,14 @@ struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap,
223 const u32 version, 223 const u32 version,
224 const char *hostname, 224 const char *hostname,
225 int noresvport); 225 int noresvport);
226void nlmclnt_release_host(struct nlm_host *);
226struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, 227struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp,
227 const char *hostname, 228 const char *hostname,
228 const size_t hostname_len); 229 const size_t hostname_len);
230void nlmsvc_release_host(struct nlm_host *);
229struct rpc_clnt * nlm_bind_host(struct nlm_host *); 231struct rpc_clnt * nlm_bind_host(struct nlm_host *);
230void nlm_rebind_host(struct nlm_host *); 232void nlm_rebind_host(struct nlm_host *);
231struct nlm_host * nlm_get_host(struct nlm_host *); 233struct nlm_host * nlm_get_host(struct nlm_host *);
232void nlm_release_host(struct nlm_host *);
233void nlm_shutdown_hosts(void); 234void nlm_shutdown_hosts(void);
234void nlm_host_rebooted(const struct nlm_reboot *); 235void nlm_host_rebooted(const struct nlm_reboot *);
235 236
@@ -267,6 +268,7 @@ unsigned long nlmsvc_retry_blocked(void);
267void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, 268void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *,
268 nlm_host_match_fn_t match); 269 nlm_host_match_fn_t match);
269void nlmsvc_grant_reply(struct nlm_cookie *, __be32); 270void nlmsvc_grant_reply(struct nlm_cookie *, __be32);
271void nlmsvc_release_call(struct nlm_rqst *);
270 272
271/* 273/*
272 * File handling for the server personality 274 * File handling for the server personality
diff --git a/include/linux/nfs3.h b/include/linux/nfs3.h
index ac33806ec7f9..6ccfe3b641e1 100644
--- a/include/linux/nfs3.h
+++ b/include/linux/nfs3.h
@@ -11,6 +11,9 @@
11#define NFS3_MAXGROUPS 16 11#define NFS3_MAXGROUPS 16
12#define NFS3_FHSIZE 64 12#define NFS3_FHSIZE 64
13#define NFS3_COOKIESIZE 4 13#define NFS3_COOKIESIZE 4
14#define NFS3_CREATEVERFSIZE 8
15#define NFS3_COOKIEVERFSIZE 8
16#define NFS3_WRITEVERFSIZE 8
14#define NFS3_FIFO_DEV (-1) 17#define NFS3_FIFO_DEV (-1)
15#define NFS3MODE_FMT 0170000 18#define NFS3MODE_FMT 0170000
16#define NFS3MODE_DIR 0040000 19#define NFS3MODE_DIR 0040000
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 452d96436d26..b197563913bf 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -47,11 +47,6 @@ struct nfs_client {
47 u64 cl_clientid; /* constant */ 47 u64 cl_clientid; /* constant */
48 unsigned long cl_state; 48 unsigned long cl_state;
49 49
50 struct rb_root cl_openowner_id;
51 struct rb_root cl_lockowner_id;
52
53 struct list_head cl_delegations;
54 struct rb_root cl_state_owners;
55 spinlock_t cl_lock; 50 spinlock_t cl_lock;
56 51
57 unsigned long cl_lease_time; 52 unsigned long cl_lease_time;
@@ -71,6 +66,7 @@ struct nfs_client {
71 */ 66 */
72 char cl_ipaddr[48]; 67 char cl_ipaddr[48];
73 unsigned char cl_id_uniquifier; 68 unsigned char cl_id_uniquifier;
69 u32 cl_cb_ident; /* v4.0 callback identifier */
74 const struct nfs4_minor_version_ops *cl_mvops; 70 const struct nfs4_minor_version_ops *cl_mvops;
75#endif /* CONFIG_NFS_V4 */ 71#endif /* CONFIG_NFS_V4 */
76 72
@@ -148,7 +144,14 @@ struct nfs_server {
148 that are supported on this 144 that are supported on this
149 filesystem */ 145 filesystem */
150 struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */ 146 struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */
147 struct rpc_wait_queue roc_rpcwaitq;
148
149 /* the following fields are protected by nfs_client->cl_lock */
150 struct rb_root state_owners;
151 struct rb_root openowner_id;
152 struct rb_root lockowner_id;
151#endif 153#endif
154 struct list_head delegations;
152 void (*destroy)(struct nfs_server *); 155 void (*destroy)(struct nfs_server *);
153 156
154 atomic_t active; /* Keep trace of any activity to this server */ 157 atomic_t active; /* Keep trace of any activity to this server */
@@ -196,6 +199,7 @@ struct nfs4_slot_table {
196 * op for dynamic resizing */ 199 * op for dynamic resizing */
197 int target_max_slots; /* Set by CB_RECALL_SLOT as 200 int target_max_slots; /* Set by CB_RECALL_SLOT as
198 * the new max_slots */ 201 * the new max_slots */
202 struct completion complete;
199}; 203};
200 204
201static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp) 205static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp)
@@ -212,7 +216,6 @@ struct nfs4_session {
212 unsigned long session_state; 216 unsigned long session_state;
213 u32 hash_alg; 217 u32 hash_alg;
214 u32 ssv_len; 218 u32 ssv_len;
215 struct completion complete;
216 219
217 /* The fore and back channel */ 220 /* The fore and back channel */
218 struct nfs4_channel_attrs fc_attrs; 221 struct nfs4_channel_attrs fc_attrs;
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 80f07198a31a..b0068579bec2 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -208,6 +208,7 @@ struct nfs4_layoutget_args {
208 struct inode *inode; 208 struct inode *inode;
209 struct nfs_open_context *ctx; 209 struct nfs_open_context *ctx;
210 struct nfs4_sequence_args seq_args; 210 struct nfs4_sequence_args seq_args;
211 nfs4_stateid stateid;
211}; 212};
212 213
213struct nfs4_layoutget_res { 214struct nfs4_layoutget_res {
@@ -223,7 +224,6 @@ struct nfs4_layoutget {
223 struct nfs4_layoutget_args args; 224 struct nfs4_layoutget_args args;
224 struct nfs4_layoutget_res res; 225 struct nfs4_layoutget_res res;
225 struct pnfs_layout_segment **lsegpp; 226 struct pnfs_layout_segment **lsegpp;
226 int status;
227}; 227};
228 228
229struct nfs4_getdeviceinfo_args { 229struct nfs4_getdeviceinfo_args {
@@ -317,6 +317,7 @@ struct nfs_closeres {
317struct nfs_lowner { 317struct nfs_lowner {
318 __u64 clientid; 318 __u64 clientid;
319 __u64 id; 319 __u64 id;
320 dev_t s_dev;
320}; 321};
321 322
322struct nfs_lock_args { 323struct nfs_lock_args {
@@ -484,6 +485,7 @@ struct nfs_entry {
484 struct nfs_fh * fh; 485 struct nfs_fh * fh;
485 struct nfs_fattr * fattr; 486 struct nfs_fattr * fattr;
486 unsigned char d_type; 487 unsigned char d_type;
488 struct nfs_server * server;
487}; 489};
488 490
489/* 491/*
@@ -1089,7 +1091,7 @@ struct nfs_rpc_ops {
1089 int (*pathconf) (struct nfs_server *, struct nfs_fh *, 1091 int (*pathconf) (struct nfs_server *, struct nfs_fh *,
1090 struct nfs_pathconf *); 1092 struct nfs_pathconf *);
1091 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); 1093 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
1092 __be32 *(*decode_dirent)(struct xdr_stream *, struct nfs_entry *, struct nfs_server *, int plus); 1094 int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int);
1093 void (*read_setup) (struct nfs_read_data *, struct rpc_message *); 1095 void (*read_setup) (struct nfs_read_data *, struct rpc_message *);
1094 int (*read_done) (struct rpc_task *, struct nfs_read_data *); 1096 int (*read_done) (struct rpc_task *, struct nfs_read_data *);
1095 void (*write_setup) (struct nfs_write_data *, struct rpc_message *); 1097 void (*write_setup) (struct nfs_write_data *, struct rpc_message *);
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index b2024757edd5..8521067ed4f7 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -110,9 +110,9 @@ struct rpc_credops {
110 __be32 * (*crmarshal)(struct rpc_task *, __be32 *); 110 __be32 * (*crmarshal)(struct rpc_task *, __be32 *);
111 int (*crrefresh)(struct rpc_task *); 111 int (*crrefresh)(struct rpc_task *);
112 __be32 * (*crvalidate)(struct rpc_task *, __be32 *); 112 __be32 * (*crvalidate)(struct rpc_task *, __be32 *);
113 int (*crwrap_req)(struct rpc_task *, kxdrproc_t, 113 int (*crwrap_req)(struct rpc_task *, kxdreproc_t,
114 void *, __be32 *, void *); 114 void *, __be32 *, void *);
115 int (*crunwrap_resp)(struct rpc_task *, kxdrproc_t, 115 int (*crunwrap_resp)(struct rpc_task *, kxdrdproc_t,
116 void *, __be32 *, void *); 116 void *, __be32 *, void *);
117}; 117};
118 118
@@ -139,8 +139,8 @@ struct rpc_cred * rpcauth_generic_bind_cred(struct rpc_task *, struct rpc_cred *
139void put_rpccred(struct rpc_cred *); 139void put_rpccred(struct rpc_cred *);
140__be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); 140__be32 * rpcauth_marshcred(struct rpc_task *, __be32 *);
141__be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); 141__be32 * rpcauth_checkverf(struct rpc_task *, __be32 *);
142int rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, __be32 *data, void *obj); 142int rpcauth_wrap_req(struct rpc_task *task, kxdreproc_t encode, void *rqstp, __be32 *data, void *obj);
143int rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, __be32 *data, void *obj); 143int rpcauth_unwrap_resp(struct rpc_task *task, kxdrdproc_t decode, void *rqstp, __be32 *data, void *obj);
144int rpcauth_refreshcred(struct rpc_task *); 144int rpcauth_refreshcred(struct rpc_task *);
145void rpcauth_invalcred(struct rpc_task *); 145void rpcauth_invalcred(struct rpc_task *);
146int rpcauth_uptodatecred(struct rpc_task *); 146int rpcauth_uptodatecred(struct rpc_task *);
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h
index 7c91260c44a9..c50b458b8a3f 100644
--- a/include/linux/sunrpc/bc_xprt.h
+++ b/include/linux/sunrpc/bc_xprt.h
@@ -43,10 +43,18 @@ int bc_send(struct rpc_rqst *req);
43 */ 43 */
44static inline int svc_is_backchannel(const struct svc_rqst *rqstp) 44static inline int svc_is_backchannel(const struct svc_rqst *rqstp)
45{ 45{
46 if (rqstp->rq_server->bc_xprt) 46 if (rqstp->rq_server->sv_bc_xprt)
47 return 1; 47 return 1;
48 return 0; 48 return 0;
49} 49}
50static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp)
51{
52 if (svc_is_backchannel(rqstp))
53 return (struct nfs4_sessionid *)
54 rqstp->rq_server->sv_bc_xprt->xpt_bc_sid;
55 return NULL;
56}
57
50#else /* CONFIG_NFS_V4_1 */ 58#else /* CONFIG_NFS_V4_1 */
51static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, 59static inline int xprt_setup_backchannel(struct rpc_xprt *xprt,
52 unsigned int min_reqs) 60 unsigned int min_reqs)
@@ -59,6 +67,11 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp)
59 return 0; 67 return 0;
60} 68}
61 69
70static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp)
71{
72 return NULL;
73}
74
62static inline void xprt_free_bc_request(struct rpc_rqst *req) 75static inline void xprt_free_bc_request(struct rpc_rqst *req)
63{ 76{
64} 77}
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index a5a55f284b7d..ef9476a36ff7 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -89,8 +89,8 @@ struct rpc_version {
89 */ 89 */
90struct rpc_procinfo { 90struct rpc_procinfo {
91 u32 p_proc; /* RPC procedure number */ 91 u32 p_proc; /* RPC procedure number */
92 kxdrproc_t p_encode; /* XDR encode function */ 92 kxdreproc_t p_encode; /* XDR encode function */
93 kxdrproc_t p_decode; /* XDR decode function */ 93 kxdrdproc_t p_decode; /* XDR decode function */
94 unsigned int p_arglen; /* argument hdr length (u32) */ 94 unsigned int p_arglen; /* argument hdr length (u32) */
95 unsigned int p_replen; /* reply hdr length (u32) */ 95 unsigned int p_replen; /* reply hdr length (u32) */
96 unsigned int p_count; /* call count */ 96 unsigned int p_count; /* call count */
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 5a3085b9b394..c81d4d8be3a9 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -99,7 +99,7 @@ struct svc_serv {
99 spinlock_t sv_cb_lock; /* protects the svc_cb_list */ 99 spinlock_t sv_cb_lock; /* protects the svc_cb_list */
100 wait_queue_head_t sv_cb_waitq; /* sleep here if there are no 100 wait_queue_head_t sv_cb_waitq; /* sleep here if there are no
101 * entries in the svc_cb_list */ 101 * entries in the svc_cb_list */
102 struct svc_xprt *bc_xprt; 102 struct svc_xprt *sv_bc_xprt; /* callback on fore channel */
103#endif /* CONFIG_NFS_V4_1 */ 103#endif /* CONFIG_NFS_V4_1 */
104}; 104};
105 105
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
index aea0d438e3c7..357da5e0daa3 100644
--- a/include/linux/sunrpc/svc_xprt.h
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -78,6 +78,7 @@ struct svc_xprt {
78 size_t xpt_remotelen; /* length of address */ 78 size_t xpt_remotelen; /* length of address */
79 struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ 79 struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */
80 struct list_head xpt_users; /* callbacks on free */ 80 struct list_head xpt_users; /* callbacks on free */
81 void *xpt_bc_sid; /* back channel session ID */
81 82
82 struct net *xpt_net; 83 struct net *xpt_net;
83}; 84};
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index 7783c687c777..fc84b7a19ca3 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -33,8 +33,8 @@ struct xdr_netobj {
33}; 33};
34 34
35/* 35/*
36 * This is the generic XDR function. rqstp is either a rpc_rqst (client 36 * This is the legacy generic XDR function. rqstp is either a rpc_rqst
37 * side) or svc_rqst pointer (server side). 37 * (client side) or svc_rqst pointer (server side).
38 * Encode functions always assume there's enough room in the buffer. 38 * Encode functions always assume there's enough room in the buffer.
39 */ 39 */
40typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); 40typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj);
@@ -205,6 +205,12 @@ struct xdr_stream {
205 struct page **page_ptr; /* pointer to the current page */ 205 struct page **page_ptr; /* pointer to the current page */
206}; 206};
207 207
208/*
209 * These are the xdr_stream style generic XDR encode and decode functions.
210 */
211typedef void (*kxdreproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj);
212typedef int (*kxdrdproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj);
213
208extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); 214extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p);
209extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); 215extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes);
210extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, 216extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages,