aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/svc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sunrpc/svc.h')
-rw-r--r--include/linux/sunrpc/svc.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 21678464883a..6f22cfeef5e3 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -26,10 +26,10 @@ typedef int (*svc_thread_fn)(void *);
26 26
27/* statistics for svc_pool structures */ 27/* statistics for svc_pool structures */
28struct svc_pool_stats { 28struct svc_pool_stats {
29 unsigned long packets; 29 atomic_long_t packets;
30 unsigned long sockets_queued; 30 unsigned long sockets_queued;
31 unsigned long threads_woken; 31 atomic_long_t threads_woken;
32 unsigned long threads_timedout; 32 atomic_long_t threads_timedout;
33}; 33};
34 34
35/* 35/*
@@ -45,12 +45,13 @@ struct svc_pool_stats {
45struct svc_pool { 45struct svc_pool {
46 unsigned int sp_id; /* pool id; also node id on NUMA */ 46 unsigned int sp_id; /* pool id; also node id on NUMA */
47 spinlock_t sp_lock; /* protects all fields */ 47 spinlock_t sp_lock; /* protects all fields */
48 struct list_head sp_threads; /* idle server threads */
49 struct list_head sp_sockets; /* pending sockets */ 48 struct list_head sp_sockets; /* pending sockets */
50 unsigned int sp_nrthreads; /* # of threads in pool */ 49 unsigned int sp_nrthreads; /* # of threads in pool */
51 struct list_head sp_all_threads; /* all server threads */ 50 struct list_head sp_all_threads; /* all server threads */
52 struct svc_pool_stats sp_stats; /* statistics on pool operation */ 51 struct svc_pool_stats sp_stats; /* statistics on pool operation */
53 int sp_task_pending;/* has pending task */ 52#define SP_TASK_PENDING (0) /* still work to do even if no
53 * xprt is queued. */
54 unsigned long sp_flags;
54} ____cacheline_aligned_in_smp; 55} ____cacheline_aligned_in_smp;
55 56
56/* 57/*
@@ -219,8 +220,8 @@ static inline void svc_putu32(struct kvec *iov, __be32 val)
219 * processed. 220 * processed.
220 */ 221 */
221struct svc_rqst { 222struct svc_rqst {
222 struct list_head rq_list; /* idle list */
223 struct list_head rq_all; /* all threads list */ 223 struct list_head rq_all; /* all threads list */
224 struct rcu_head rq_rcu_head; /* for RCU deferred kfree */
224 struct svc_xprt * rq_xprt; /* transport ptr */ 225 struct svc_xprt * rq_xprt; /* transport ptr */
225 226
226 struct sockaddr_storage rq_addr; /* peer address */ 227 struct sockaddr_storage rq_addr; /* peer address */
@@ -236,7 +237,6 @@ struct svc_rqst {
236 struct svc_cred rq_cred; /* auth info */ 237 struct svc_cred rq_cred; /* auth info */
237 void * rq_xprt_ctxt; /* transport specific context ptr */ 238 void * rq_xprt_ctxt; /* transport specific context ptr */
238 struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */ 239 struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */
239 bool rq_usedeferral; /* use deferral */
240 240
241 size_t rq_xprt_hlen; /* xprt header len */ 241 size_t rq_xprt_hlen; /* xprt header len */
242 struct xdr_buf rq_arg; 242 struct xdr_buf rq_arg;
@@ -253,9 +253,17 @@ struct svc_rqst {
253 u32 rq_vers; /* program version */ 253 u32 rq_vers; /* program version */
254 u32 rq_proc; /* procedure number */ 254 u32 rq_proc; /* procedure number */
255 u32 rq_prot; /* IP protocol */ 255 u32 rq_prot; /* IP protocol */
256 unsigned short 256 int rq_cachetype; /* catering to nfsd */
257 rq_secure : 1; /* secure port */ 257#define RQ_SECURE (0) /* secure port */
258 unsigned short rq_local : 1; /* local request */ 258#define RQ_LOCAL (1) /* local request */
259#define RQ_USEDEFERRAL (2) /* use deferral */
260#define RQ_DROPME (3) /* drop current reply */
261#define RQ_SPLICE_OK (4) /* turned off in gss privacy
262 * to prevent encrypting page
263 * cache pages */
264#define RQ_VICTIM (5) /* about to be shut down */
265#define RQ_BUSY (6) /* request is busy */
266 unsigned long rq_flags; /* flags field */
259 267
260 void * rq_argp; /* decoded arguments */ 268 void * rq_argp; /* decoded arguments */
261 void * rq_resp; /* xdr'd results */ 269 void * rq_resp; /* xdr'd results */
@@ -271,16 +279,12 @@ struct svc_rqst {
271 struct cache_req rq_chandle; /* handle passed to caches for 279 struct cache_req rq_chandle; /* handle passed to caches for
272 * request delaying 280 * request delaying
273 */ 281 */
274 bool rq_dropme;
275 /* Catering to nfsd */ 282 /* Catering to nfsd */
276 struct auth_domain * rq_client; /* RPC peer info */ 283 struct auth_domain * rq_client; /* RPC peer info */
277 struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ 284 struct auth_domain * rq_gssclient; /* "gss/"-style peer info */
278 int rq_cachetype;
279 struct svc_cacherep * rq_cacherep; /* cache info */ 285 struct svc_cacherep * rq_cacherep; /* cache info */
280 bool rq_splice_ok; /* turned off in gss privacy
281 * to prevent encrypting page
282 * cache pages */
283 struct task_struct *rq_task; /* service thread */ 286 struct task_struct *rq_task; /* service thread */
287 spinlock_t rq_lock; /* per-request lock */
284}; 288};
285 289
286#define SVC_NET(svc_rqst) (svc_rqst->rq_xprt->xpt_net) 290#define SVC_NET(svc_rqst) (svc_rqst->rq_xprt->xpt_net)