diff options
Diffstat (limited to 'include/linux/sunrpc/sched.h')
-rw-r--r-- | include/linux/sunrpc/sched.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index e7756896f3ca..dc0c3cc3ada3 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -103,6 +103,7 @@ typedef void (*rpc_action)(struct rpc_task *); | |||
103 | struct rpc_call_ops { | 103 | struct rpc_call_ops { |
104 | void (*rpc_call_prepare)(struct rpc_task *, void *); | 104 | void (*rpc_call_prepare)(struct rpc_task *, void *); |
105 | void (*rpc_call_done)(struct rpc_task *, void *); | 105 | void (*rpc_call_done)(struct rpc_task *, void *); |
106 | void (*rpc_count_stats)(struct rpc_task *, void *); | ||
106 | void (*rpc_release)(void *); | 107 | void (*rpc_release)(void *); |
107 | }; | 108 | }; |
108 | 109 | ||
@@ -195,7 +196,7 @@ struct rpc_wait_queue { | |||
195 | unsigned char nr; /* # tasks remaining for cookie */ | 196 | unsigned char nr; /* # tasks remaining for cookie */ |
196 | unsigned short qlen; /* total # tasks waiting in queue */ | 197 | unsigned short qlen; /* total # tasks waiting in queue */ |
197 | struct rpc_timer timer_list; | 198 | struct rpc_timer timer_list; |
198 | #ifdef RPC_DEBUG | 199 | #if defined(RPC_DEBUG) || defined(RPC_TRACEPOINTS) |
199 | const char * name; | 200 | const char * name; |
200 | #endif | 201 | #endif |
201 | }; | 202 | }; |
@@ -235,6 +236,9 @@ void rpc_wake_up_queued_task(struct rpc_wait_queue *, | |||
235 | struct rpc_task *); | 236 | struct rpc_task *); |
236 | void rpc_wake_up(struct rpc_wait_queue *); | 237 | void rpc_wake_up(struct rpc_wait_queue *); |
237 | struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); | 238 | struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); |
239 | struct rpc_task *rpc_wake_up_first(struct rpc_wait_queue *, | ||
240 | bool (*)(struct rpc_task *, void *), | ||
241 | void *); | ||
238 | void rpc_wake_up_status(struct rpc_wait_queue *, int); | 242 | void rpc_wake_up_status(struct rpc_wait_queue *, int); |
239 | int rpc_queue_empty(struct rpc_wait_queue *); | 243 | int rpc_queue_empty(struct rpc_wait_queue *); |
240 | void rpc_delay(struct rpc_task *, unsigned long); | 244 | void rpc_delay(struct rpc_task *, unsigned long); |
@@ -244,7 +248,8 @@ int rpciod_up(void); | |||
244 | void rpciod_down(void); | 248 | void rpciod_down(void); |
245 | int __rpc_wait_for_completion_task(struct rpc_task *task, int (*)(void *)); | 249 | int __rpc_wait_for_completion_task(struct rpc_task *task, int (*)(void *)); |
246 | #ifdef RPC_DEBUG | 250 | #ifdef RPC_DEBUG |
247 | void rpc_show_tasks(void); | 251 | struct net; |
252 | void rpc_show_tasks(struct net *); | ||
248 | #endif | 253 | #endif |
249 | int rpc_init_mempool(void); | 254 | int rpc_init_mempool(void); |
250 | void rpc_destroy_mempool(void); | 255 | void rpc_destroy_mempool(void); |
@@ -266,11 +271,22 @@ static inline int rpc_task_has_priority(struct rpc_task *task, unsigned char pri | |||
266 | return (task->tk_priority + RPC_PRIORITY_LOW == prio); | 271 | return (task->tk_priority + RPC_PRIORITY_LOW == prio); |
267 | } | 272 | } |
268 | 273 | ||
269 | #ifdef RPC_DEBUG | 274 | #if defined(RPC_DEBUG) || defined (RPC_TRACEPOINTS) |
270 | static inline const char * rpc_qname(struct rpc_wait_queue *q) | 275 | static inline const char * rpc_qname(const struct rpc_wait_queue *q) |
271 | { | 276 | { |
272 | return ((q && q->name) ? q->name : "unknown"); | 277 | return ((q && q->name) ? q->name : "unknown"); |
273 | } | 278 | } |
279 | |||
280 | static inline void rpc_assign_waitqueue_name(struct rpc_wait_queue *q, | ||
281 | const char *name) | ||
282 | { | ||
283 | q->name = name; | ||
284 | } | ||
285 | #else | ||
286 | static inline void rpc_assign_waitqueue_name(struct rpc_wait_queue *q, | ||
287 | const char *name) | ||
288 | { | ||
289 | } | ||
274 | #endif | 290 | #endif |
275 | 291 | ||
276 | #endif /* _LINUX_SUNRPC_SCHED_H_ */ | 292 | #endif /* _LINUX_SUNRPC_SCHED_H_ */ |