aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r--fs/dlm/dlm_internal.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index f632b58cd222..b94204913011 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -192,11 +192,6 @@ struct dlm_args {
192 * lkb is a process copy, the nodeid specifies the lock master. 192 * lkb is a process copy, the nodeid specifies the lock master.
193 */ 193 */
194 194
195/* lkb_ast_type */
196
197#define AST_COMP 1
198#define AST_BAST 2
199
200/* lkb_status */ 195/* lkb_status */
201 196
202#define DLM_LKSTS_WAITING 1 197#define DLM_LKSTS_WAITING 1
@@ -217,6 +212,20 @@ struct dlm_args {
217#define DLM_IFL_USER 0x00000001 212#define DLM_IFL_USER 0x00000001
218#define DLM_IFL_ORPHAN 0x00000002 213#define DLM_IFL_ORPHAN 0x00000002
219 214
215#define DLM_CALLBACKS_SIZE 6
216
217#define DLM_CB_CAST 0x00000001
218#define DLM_CB_BAST 0x00000002
219#define DLM_CB_SKIP 0x00000004
220
221struct dlm_callback {
222 uint64_t seq;
223 uint32_t flags; /* DLM_CBF_ */
224 int sb_status; /* copy to lksb status */
225 uint8_t sb_flags; /* copy to lksb flags */
226 int8_t mode; /* rq mode of bast, gr mode of cast */
227};
228
220struct dlm_lkb { 229struct dlm_lkb {
221 struct dlm_rsb *lkb_resource; /* the rsb */ 230 struct dlm_rsb *lkb_resource; /* the rsb */
222 struct kref lkb_ref; 231 struct kref lkb_ref;
@@ -236,13 +245,6 @@ struct dlm_lkb {
236 245
237 int8_t lkb_wait_type; /* type of reply waiting for */ 246 int8_t lkb_wait_type; /* type of reply waiting for */
238 int8_t lkb_wait_count; 247 int8_t lkb_wait_count;
239 int8_t lkb_ast_type; /* type of ast queued for */
240 int8_t lkb_ast_first; /* type of first ast queued */
241
242 int8_t lkb_bastmode; /* req mode of queued bast */
243 int8_t lkb_castmode; /* gr mode of queued cast */
244 int8_t lkb_bastmode_done; /* last delivered bastmode */
245 int8_t lkb_castmode_done; /* last delivered castmode */
246 248
247 struct list_head lkb_idtbl_list; /* lockspace lkbtbl */ 249 struct list_head lkb_idtbl_list; /* lockspace lkbtbl */
248 struct list_head lkb_statequeue; /* rsb g/c/w list */ 250 struct list_head lkb_statequeue; /* rsb g/c/w list */
@@ -251,10 +253,15 @@ struct dlm_lkb {
251 struct list_head lkb_astqueue; /* need ast to be sent */ 253 struct list_head lkb_astqueue; /* need ast to be sent */
252 struct list_head lkb_ownqueue; /* list of locks for a process */ 254 struct list_head lkb_ownqueue; /* list of locks for a process */
253 struct list_head lkb_time_list; 255 struct list_head lkb_time_list;
254 ktime_t lkb_time_bast; /* for debugging */
255 ktime_t lkb_timestamp; 256 ktime_t lkb_timestamp;
256 unsigned long lkb_timeout_cs; 257 unsigned long lkb_timeout_cs;
257 258
259 struct dlm_callback lkb_callbacks[DLM_CALLBACKS_SIZE];
260 struct dlm_callback lkb_last_cast;
261 struct dlm_callback lkb_last_bast;
262 ktime_t lkb_last_cast_time; /* for debugging */
263 ktime_t lkb_last_bast_time; /* for debugging */
264
258 char *lkb_lvbptr; 265 char *lkb_lvbptr;
259 struct dlm_lksb *lkb_lksb; /* caller's status block */ 266 struct dlm_lksb *lkb_lksb; /* caller's status block */
260 void (*lkb_astfn) (void *astparam); 267 void (*lkb_astfn) (void *astparam);
@@ -544,8 +551,6 @@ struct dlm_user_args {
544 (dlm_user_proc) on the struct file, 551 (dlm_user_proc) on the struct file,
545 the process's locks point back to it*/ 552 the process's locks point back to it*/
546 struct dlm_lksb lksb; 553 struct dlm_lksb lksb;
547 int old_mode;
548 int update_user_lvb;
549 struct dlm_lksb __user *user_lksb; 554 struct dlm_lksb __user *user_lksb;
550 void __user *castparam; 555 void __user *castparam;
551 void __user *castaddr; 556 void __user *castaddr;