diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 13:47:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 13:47:44 -0500 |
commit | e4bdda1bc3123a9e65f4dd93a23041fde8ed3dc2 (patch) | |
tree | c2f75cc08bb4c5cbd9103e14399ea5ab66ce960d /include/linux/sunrpc | |
parent | 74f3ae743427b87e43b5cb9f4257021ae8ad4267 (diff) | |
parent | 380454126f1357db9270f9d1ca05dfe1a6e4ad47 (diff) |
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFSv4: Fix a regression in the NFSv4 state manager
NFSv4: Release the sequence id before restarting a CLOSE rpc call
nfs41: fix session fore channel negotiation
nfs41: do not zero seqid portion of stateid on close
nfs: run state manager in privileged mode
nfs: make recovery state manager operations privileged
nfs: enforce FIFO ordering of operations trying to acquire slot
rpc: add a new priority in RPC task
nfs: remove rpc_task argument from nfs4_find_slot
rpc: add rpc_queue_empty function
nfs: change nfs4_do_setlk params to identify recovery type
nfs: do not do a LOOKUP after open
nfs: minor cleanup of session draining
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/sched.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 1906782ec86b..7bc7fd5291ce 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -173,7 +173,8 @@ struct rpc_task_setup { | |||
173 | #define RPC_PRIORITY_LOW (-1) | 173 | #define RPC_PRIORITY_LOW (-1) |
174 | #define RPC_PRIORITY_NORMAL (0) | 174 | #define RPC_PRIORITY_NORMAL (0) |
175 | #define RPC_PRIORITY_HIGH (1) | 175 | #define RPC_PRIORITY_HIGH (1) |
176 | #define RPC_NR_PRIORITY (1 + RPC_PRIORITY_HIGH - RPC_PRIORITY_LOW) | 176 | #define RPC_PRIORITY_PRIVILEGED (2) |
177 | #define RPC_NR_PRIORITY (1 + RPC_PRIORITY_PRIVILEGED - RPC_PRIORITY_LOW) | ||
177 | 178 | ||
178 | struct rpc_timer { | 179 | struct rpc_timer { |
179 | struct timer_list timer; | 180 | struct timer_list timer; |
@@ -229,6 +230,7 @@ void rpc_wake_up_queued_task(struct rpc_wait_queue *, | |||
229 | void rpc_wake_up(struct rpc_wait_queue *); | 230 | void rpc_wake_up(struct rpc_wait_queue *); |
230 | struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); | 231 | struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); |
231 | void rpc_wake_up_status(struct rpc_wait_queue *, int); | 232 | void rpc_wake_up_status(struct rpc_wait_queue *, int); |
233 | int rpc_queue_empty(struct rpc_wait_queue *); | ||
232 | void rpc_delay(struct rpc_task *, unsigned long); | 234 | void rpc_delay(struct rpc_task *, unsigned long); |
233 | void * rpc_malloc(struct rpc_task *, size_t); | 235 | void * rpc_malloc(struct rpc_task *, size_t); |
234 | void rpc_free(void *); | 236 | void rpc_free(void *); |
@@ -254,6 +256,16 @@ static inline int rpc_wait_for_completion_task(struct rpc_task *task) | |||
254 | return __rpc_wait_for_completion_task(task, NULL); | 256 | return __rpc_wait_for_completion_task(task, NULL); |
255 | } | 257 | } |
256 | 258 | ||
259 | static inline void rpc_task_set_priority(struct rpc_task *task, unsigned char prio) | ||
260 | { | ||
261 | task->tk_priority = prio - RPC_PRIORITY_LOW; | ||
262 | } | ||
263 | |||
264 | static inline int rpc_task_has_priority(struct rpc_task *task, unsigned char prio) | ||
265 | { | ||
266 | return (task->tk_priority + RPC_PRIORITY_LOW == prio); | ||
267 | } | ||
268 | |||
257 | #ifdef RPC_DEBUG | 269 | #ifdef RPC_DEBUG |
258 | static inline const char * rpc_qname(struct rpc_wait_queue *q) | 270 | static inline const char * rpc_qname(struct rpc_wait_queue *q) |
259 | { | 271 | { |