diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:21:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:21:46 -0400 |
commit | 14b395e35d1afdd8019d11b92e28041fad591b71 (patch) | |
tree | cff7ba9bed7a38300b19a5bacc632979d64fd9c8 /include | |
parent | 734b397cd14f3340394a8dd3266bec97d01f034b (diff) | |
parent | 5108b27651727b5aba0826e8fd7be71b42428701 (diff) |
Merge branch 'for-2.6.27' of git://linux-nfs.org/~bfields/linux
* 'for-2.6.27' of git://linux-nfs.org/~bfields/linux: (51 commits)
nfsd: nfs4xdr.c do-while is not a compound statement
nfsd: Use C99 initializers in fs/nfsd/nfs4xdr.c
lockd: Pass "struct sockaddr *" to new failover-by-IP function
lockd: get host reference in nlmsvc_create_block() instead of callers
lockd: minor svclock.c style fixes
lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_lock
lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_testlock
lockd: nlm_release_host() checks for NULL, caller needn't
file lock: reorder struct file_lock to save space on 64 bit builds
nfsd: take file and mnt write in nfs4_upgrade_open
nfsd: document open share bit tracking
nfsd: tabulate nfs4 xdr encoding functions
nfsd: dprint operation names
svcrdma: Change WR context get/put to use the kmem cache
svcrdma: Create a kmem cache for the WR contexts
svcrdma: Add flush_scheduled_work to module exit function
svcrdma: Limit ORD based on client's advertised IRD
svcrdma: Remove unused wait q from svcrdma_xprt structure
svcrdma: Remove unneeded spin locks from __svc_rdma_free
svcrdma: Add dma map count and WARN_ON
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 4 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 8 | ||||
-rw-r--r-- | include/linux/nfs4.h | 3 | ||||
-rw-r--r-- | include/linux/nfsd/nfsd.h | 27 | ||||
-rw-r--r-- | include/linux/nfsd/state.h | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/gss_krb5.h | 3 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 7 | ||||
-rw-r--r-- | include/linux/sunrpc/svc_rdma.h | 36 |
8 files changed, 56 insertions, 34 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index c6455dadb21b..9c2ac5c0ef5c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -918,12 +918,12 @@ struct file_lock { | |||
918 | struct list_head fl_link; /* doubly linked list of all locks */ | 918 | struct list_head fl_link; /* doubly linked list of all locks */ |
919 | struct list_head fl_block; /* circular list of blocked processes */ | 919 | struct list_head fl_block; /* circular list of blocked processes */ |
920 | fl_owner_t fl_owner; | 920 | fl_owner_t fl_owner; |
921 | unsigned char fl_flags; | ||
922 | unsigned char fl_type; | ||
921 | unsigned int fl_pid; | 923 | unsigned int fl_pid; |
922 | struct pid *fl_nspid; | 924 | struct pid *fl_nspid; |
923 | wait_queue_head_t fl_wait; | 925 | wait_queue_head_t fl_wait; |
924 | struct file *fl_file; | 926 | struct file *fl_file; |
925 | unsigned char fl_flags; | ||
926 | unsigned char fl_type; | ||
927 | loff_t fl_start; | 927 | loff_t fl_start; |
928 | loff_t fl_end; | 928 | loff_t fl_end; |
929 | 929 | ||
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 102d928f7206..dbb87ab282e8 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -200,10 +200,12 @@ typedef int (*nlm_host_match_fn_t)(void *cur, struct nlm_host *ref); | |||
200 | * Server-side lock handling | 200 | * Server-side lock handling |
201 | */ | 201 | */ |
202 | __be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, | 202 | __be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, |
203 | struct nlm_lock *, int, struct nlm_cookie *); | 203 | struct nlm_host *, struct nlm_lock *, int, |
204 | struct nlm_cookie *); | ||
204 | __be32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); | 205 | __be32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); |
205 | __be32 nlmsvc_testlock(struct svc_rqst *, struct nlm_file *, | 206 | __be32 nlmsvc_testlock(struct svc_rqst *, struct nlm_file *, |
206 | struct nlm_lock *, struct nlm_lock *, struct nlm_cookie *); | 207 | struct nlm_host *, struct nlm_lock *, |
208 | struct nlm_lock *, struct nlm_cookie *); | ||
207 | __be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *); | 209 | __be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *); |
208 | unsigned long nlmsvc_retry_blocked(void); | 210 | unsigned long nlmsvc_retry_blocked(void); |
209 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, | 211 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, |
@@ -224,7 +226,7 @@ void nlmsvc_invalidate_all(void); | |||
224 | * Cluster failover support | 226 | * Cluster failover support |
225 | */ | 227 | */ |
226 | int nlmsvc_unlock_all_by_sb(struct super_block *sb); | 228 | int nlmsvc_unlock_all_by_sb(struct super_block *sb); |
227 | int nlmsvc_unlock_all_by_ip(__be32 server_addr); | 229 | int nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr); |
228 | 230 | ||
229 | static inline struct inode *nlmsvc_file_inode(struct nlm_file *file) | 231 | static inline struct inode *nlmsvc_file_inode(struct nlm_file *file) |
230 | { | 232 | { |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 8726491de154..ea0366769484 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -65,9 +65,6 @@ | |||
65 | #define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010 | 65 | #define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010 |
66 | #define NFS4_ACE_FAILED_ACCESS_ACE_FLAG 0x00000020 | 66 | #define NFS4_ACE_FAILED_ACCESS_ACE_FLAG 0x00000020 |
67 | #define NFS4_ACE_IDENTIFIER_GROUP 0x00000040 | 67 | #define NFS4_ACE_IDENTIFIER_GROUP 0x00000040 |
68 | #define NFS4_ACE_OWNER 0x00000080 | ||
69 | #define NFS4_ACE_GROUP 0x00000100 | ||
70 | #define NFS4_ACE_EVERYONE 0x00000200 | ||
71 | 68 | ||
72 | #define NFS4_ACE_READ_DATA 0x00000001 | 69 | #define NFS4_ACE_READ_DATA 0x00000001 |
73 | #define NFS4_ACE_LIST_DIRECTORY 0x00000001 | 70 | #define NFS4_ACE_LIST_DIRECTORY 0x00000001 |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 41d30c9c9de6..a2861d95ecc3 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -28,20 +28,20 @@ | |||
28 | #define NFSD_SUPPORTED_MINOR_VERSION 0 | 28 | #define NFSD_SUPPORTED_MINOR_VERSION 0 |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * Special flags for nfsd_permission. These must be different from MAY_READ, | 31 | * Flags for nfsd_permission |
32 | * MAY_WRITE, and MAY_EXEC. | ||
33 | */ | 32 | */ |
34 | #define MAY_NOP 0 | 33 | #define NFSD_MAY_NOP 0 |
35 | #define MAY_SATTR 8 | 34 | #define NFSD_MAY_EXEC 1 /* == MAY_EXEC */ |
36 | #define MAY_TRUNC 16 | 35 | #define NFSD_MAY_WRITE 2 /* == MAY_WRITE */ |
37 | #define MAY_LOCK 32 | 36 | #define NFSD_MAY_READ 4 /* == MAY_READ */ |
38 | #define MAY_OWNER_OVERRIDE 64 | 37 | #define NFSD_MAY_SATTR 8 |
39 | #define MAY_LOCAL_ACCESS 128 /* IRIX doing local access check on device special file*/ | 38 | #define NFSD_MAY_TRUNC 16 |
40 | #if (MAY_SATTR | MAY_TRUNC | MAY_LOCK | MAY_OWNER_OVERRIDE | MAY_LOCAL_ACCESS) & (MAY_READ | MAY_WRITE | MAY_EXEC) | 39 | #define NFSD_MAY_LOCK 32 |
41 | # error "please use a different value for MAY_SATTR or MAY_TRUNC or MAY_LOCK or MAY_LOCAL_ACCESS or MAY_OWNER_OVERRIDE." | 40 | #define NFSD_MAY_OWNER_OVERRIDE 64 |
42 | #endif | 41 | #define NFSD_MAY_LOCAL_ACCESS 128 /* IRIX doing local access check on device special file*/ |
43 | #define MAY_CREATE (MAY_EXEC|MAY_WRITE) | 42 | |
44 | #define MAY_REMOVE (MAY_EXEC|MAY_WRITE|MAY_TRUNC) | 43 | #define NFSD_MAY_CREATE (NFSD_MAY_EXEC|NFSD_MAY_WRITE) |
44 | #define NFSD_MAY_REMOVE (NFSD_MAY_EXEC|NFSD_MAY_WRITE|NFSD_MAY_TRUNC) | ||
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Callback function for readdir | 47 | * Callback function for readdir |
@@ -54,6 +54,7 @@ typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int); | |||
54 | extern struct svc_program nfsd_program; | 54 | extern struct svc_program nfsd_program; |
55 | extern struct svc_version nfsd_version2, nfsd_version3, | 55 | extern struct svc_version nfsd_version2, nfsd_version3, |
56 | nfsd_version4; | 56 | nfsd_version4; |
57 | extern struct mutex nfsd_mutex; | ||
57 | extern struct svc_serv *nfsd_serv; | 58 | extern struct svc_serv *nfsd_serv; |
58 | 59 | ||
59 | extern struct seq_operations nfs_exports_op; | 60 | extern struct seq_operations nfs_exports_op; |
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index db348f749376..d0fe2e378452 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h | |||
@@ -98,8 +98,6 @@ struct nfs4_callback { | |||
98 | u32 cb_ident; | 98 | u32 cb_ident; |
99 | /* RPC client info */ | 99 | /* RPC client info */ |
100 | atomic_t cb_set; /* successful CB_NULL call */ | 100 | atomic_t cb_set; /* successful CB_NULL call */ |
101 | struct rpc_program cb_program; | ||
102 | struct rpc_stat cb_stat; | ||
103 | struct rpc_clnt * cb_client; | 101 | struct rpc_clnt * cb_client; |
104 | }; | 102 | }; |
105 | 103 | ||
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h index a10f1fb0bf7c..e7bbdba474d5 100644 --- a/include/linux/sunrpc/gss_krb5.h +++ b/include/linux/sunrpc/gss_krb5.h | |||
@@ -51,6 +51,9 @@ struct krb5_ctx { | |||
51 | 51 | ||
52 | extern spinlock_t krb5_seq_lock; | 52 | extern spinlock_t krb5_seq_lock; |
53 | 53 | ||
54 | /* The length of the Kerberos GSS token header */ | ||
55 | #define GSS_KRB5_TOK_HDR_LEN (16) | ||
56 | |||
54 | #define KG_TOK_MIC_MSG 0x0101 | 57 | #define KG_TOK_MIC_MSG 0x0101 |
55 | #define KG_TOK_WRAP_MSG 0x0201 | 58 | #define KG_TOK_WRAP_MSG 0x0201 |
56 | 59 | ||
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 4b54c5fdcfd9..dc69068d94c7 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -22,7 +22,7 @@ | |||
22 | /* | 22 | /* |
23 | * This is the RPC server thread function prototype | 23 | * This is the RPC server thread function prototype |
24 | */ | 24 | */ |
25 | typedef void (*svc_thread_fn)(struct svc_rqst *); | 25 | typedef int (*svc_thread_fn)(void *); |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * | 28 | * |
@@ -80,7 +80,6 @@ struct svc_serv { | |||
80 | struct module * sv_module; /* optional module to count when | 80 | struct module * sv_module; /* optional module to count when |
81 | * adding threads */ | 81 | * adding threads */ |
82 | svc_thread_fn sv_function; /* main function for threads */ | 82 | svc_thread_fn sv_function; /* main function for threads */ |
83 | int sv_kill_signal; /* signal to kill threads */ | ||
84 | }; | 83 | }; |
85 | 84 | ||
86 | /* | 85 | /* |
@@ -388,8 +387,8 @@ struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, | |||
388 | struct svc_pool *pool); | 387 | struct svc_pool *pool); |
389 | void svc_exit_thread(struct svc_rqst *); | 388 | void svc_exit_thread(struct svc_rqst *); |
390 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, | 389 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, |
391 | void (*shutdown)(struct svc_serv*), | 390 | void (*shutdown)(struct svc_serv*), svc_thread_fn, |
392 | svc_thread_fn, int sig, struct module *); | 391 | struct module *); |
393 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); | 392 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); |
394 | void svc_destroy(struct svc_serv *); | 393 | void svc_destroy(struct svc_serv *); |
395 | int svc_process(struct svc_rqst *); | 394 | int svc_process(struct svc_rqst *); |
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 05eb4664d0dd..ef2e3a20bf3b 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
@@ -72,7 +72,7 @@ extern atomic_t rdma_stat_sq_prod; | |||
72 | */ | 72 | */ |
73 | struct svc_rdma_op_ctxt { | 73 | struct svc_rdma_op_ctxt { |
74 | struct svc_rdma_op_ctxt *read_hdr; | 74 | struct svc_rdma_op_ctxt *read_hdr; |
75 | struct list_head free_list; | 75 | int hdr_count; |
76 | struct xdr_buf arg; | 76 | struct xdr_buf arg; |
77 | struct list_head dto_q; | 77 | struct list_head dto_q; |
78 | enum ib_wr_opcode wr_op; | 78 | enum ib_wr_opcode wr_op; |
@@ -86,6 +86,31 @@ struct svc_rdma_op_ctxt { | |||
86 | struct page *pages[RPCSVC_MAXPAGES]; | 86 | struct page *pages[RPCSVC_MAXPAGES]; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | /* | ||
90 | * NFS_ requests are mapped on the client side by the chunk lists in | ||
91 | * the RPCRDMA header. During the fetching of the RPC from the client | ||
92 | * and the writing of the reply to the client, the memory in the | ||
93 | * client and the memory in the server must be mapped as contiguous | ||
94 | * vaddr/len for access by the hardware. These data strucures keep | ||
95 | * these mappings. | ||
96 | * | ||
97 | * For an RDMA_WRITE, the 'sge' maps the RPC REPLY. For RDMA_READ, the | ||
98 | * 'sge' in the svc_rdma_req_map maps the server side RPC reply and the | ||
99 | * 'ch' field maps the read-list of the RPCRDMA header to the 'sge' | ||
100 | * mapping of the reply. | ||
101 | */ | ||
102 | struct svc_rdma_chunk_sge { | ||
103 | int start; /* sge no for this chunk */ | ||
104 | int count; /* sge count for this chunk */ | ||
105 | }; | ||
106 | struct svc_rdma_req_map { | ||
107 | unsigned long count; | ||
108 | union { | ||
109 | struct kvec sge[RPCSVC_MAXPAGES]; | ||
110 | struct svc_rdma_chunk_sge ch[RPCSVC_MAXPAGES]; | ||
111 | }; | ||
112 | }; | ||
113 | |||
89 | #define RDMACTXT_F_LAST_CTXT 2 | 114 | #define RDMACTXT_F_LAST_CTXT 2 |
90 | 115 | ||
91 | struct svcxprt_rdma { | 116 | struct svcxprt_rdma { |
@@ -93,7 +118,6 @@ struct svcxprt_rdma { | |||
93 | struct rdma_cm_id *sc_cm_id; /* RDMA connection id */ | 118 | struct rdma_cm_id *sc_cm_id; /* RDMA connection id */ |
94 | struct list_head sc_accept_q; /* Conn. waiting accept */ | 119 | struct list_head sc_accept_q; /* Conn. waiting accept */ |
95 | int sc_ord; /* RDMA read limit */ | 120 | int sc_ord; /* RDMA read limit */ |
96 | wait_queue_head_t sc_read_wait; | ||
97 | int sc_max_sge; | 121 | int sc_max_sge; |
98 | 122 | ||
99 | int sc_sq_depth; /* Depth of SQ */ | 123 | int sc_sq_depth; /* Depth of SQ */ |
@@ -104,12 +128,8 @@ struct svcxprt_rdma { | |||
104 | 128 | ||
105 | struct ib_pd *sc_pd; | 129 | struct ib_pd *sc_pd; |
106 | 130 | ||
131 | atomic_t sc_dma_used; | ||
107 | atomic_t sc_ctxt_used; | 132 | atomic_t sc_ctxt_used; |
108 | struct list_head sc_ctxt_free; | ||
109 | int sc_ctxt_cnt; | ||
110 | int sc_ctxt_bump; | ||
111 | int sc_ctxt_max; | ||
112 | spinlock_t sc_ctxt_lock; | ||
113 | struct list_head sc_rq_dto_q; | 133 | struct list_head sc_rq_dto_q; |
114 | spinlock_t sc_rq_dto_lock; | 134 | spinlock_t sc_rq_dto_lock; |
115 | struct ib_qp *sc_qp; | 135 | struct ib_qp *sc_qp; |
@@ -173,6 +193,8 @@ extern int svc_rdma_post_recv(struct svcxprt_rdma *); | |||
173 | extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); | 193 | extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); |
174 | extern struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *); | 194 | extern struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *); |
175 | extern void svc_rdma_put_context(struct svc_rdma_op_ctxt *, int); | 195 | extern void svc_rdma_put_context(struct svc_rdma_op_ctxt *, int); |
196 | extern struct svc_rdma_req_map *svc_rdma_get_req_map(void); | ||
197 | extern void svc_rdma_put_req_map(struct svc_rdma_req_map *); | ||
176 | extern void svc_sq_reap(struct svcxprt_rdma *); | 198 | extern void svc_sq_reap(struct svcxprt_rdma *); |
177 | extern void svc_rq_reap(struct svcxprt_rdma *); | 199 | extern void svc_rq_reap(struct svcxprt_rdma *); |
178 | extern struct svc_xprt_class svc_rdma_class; | 200 | extern struct svc_xprt_class svc_rdma_class; |