aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockd/lockd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/lockd/lockd.h')
-rw-r--r--include/linux/lockd/lockd.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index ac25b5649c59..05707e2fccae 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -88,7 +88,7 @@ struct nlm_wait;
88/* 88/*
89 * Memory chunk for NLM client RPC request. 89 * Memory chunk for NLM client RPC request.
90 */ 90 */
91#define NLMCLNT_OHSIZE (sizeof(utsname()->nodename)+10) 91#define NLMCLNT_OHSIZE ((__NEW_UTS_LEN) + 10u)
92struct nlm_rqst { 92struct nlm_rqst {
93 unsigned int a_flags; /* initial RPC task flags */ 93 unsigned int a_flags; /* initial RPC task flags */
94 struct nlm_host * a_host; /* host handle */ 94 struct nlm_host * a_host; /* host handle */
@@ -119,6 +119,9 @@ struct nlm_file {
119 * couldn't be granted because of a conflicting lock). 119 * couldn't be granted because of a conflicting lock).
120 */ 120 */
121#define NLM_NEVER (~(unsigned long) 0) 121#define NLM_NEVER (~(unsigned long) 0)
122/* timeout on non-blocking call: */
123#define NLM_TIMEOUT (7 * HZ)
124
122struct nlm_block { 125struct nlm_block {
123 struct kref b_count; /* Reference count */ 126 struct kref b_count; /* Reference count */
124 struct list_head b_list; /* linked list of all blocks */ 127 struct list_head b_list; /* linked list of all blocks */
@@ -130,6 +133,13 @@ struct nlm_block {
130 unsigned int b_id; /* block id */ 133 unsigned int b_id; /* block id */
131 unsigned char b_granted; /* VFS granted lock */ 134 unsigned char b_granted; /* VFS granted lock */
132 struct nlm_file * b_file; /* file in question */ 135 struct nlm_file * b_file; /* file in question */
136 struct cache_req * b_cache_req; /* deferred request handling */
137 struct file_lock * b_fl; /* set for GETLK */
138 struct cache_deferred_req * b_deferred_req;
139 unsigned int b_flags; /* block flags */
140#define B_QUEUED 1 /* lock queued */
141#define B_GOT_CALLBACK 2 /* got lock or conflicting lock */
142#define B_TIMED_OUT 4 /* filesystem too slow to respond */
133}; 143};
134 144
135/* 145/*
@@ -185,8 +195,8 @@ typedef int (*nlm_host_match_fn_t)(struct nlm_host *cur, struct nlm_host *ref)
185__be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, 195__be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *,
186 struct nlm_lock *, int, struct nlm_cookie *); 196 struct nlm_lock *, int, struct nlm_cookie *);
187__be32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); 197__be32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *);
188__be32 nlmsvc_testlock(struct nlm_file *, struct nlm_lock *, 198__be32 nlmsvc_testlock(struct svc_rqst *, struct nlm_file *,
189 struct nlm_lock *); 199 struct nlm_lock *, struct nlm_lock *, struct nlm_cookie *);
190__be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *); 200__be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *);
191unsigned long nlmsvc_retry_blocked(void); 201unsigned long nlmsvc_retry_blocked(void);
192void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, 202void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *,