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.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index 0262451eb9c6..fe2860c02449 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -37,6 +37,7 @@
37#include <linux/jhash.h> 37#include <linux/jhash.h>
38#include <linux/miscdevice.h> 38#include <linux/miscdevice.h>
39#include <linux/mutex.h> 39#include <linux/mutex.h>
40#include <linux/idr.h>
40#include <asm/uaccess.h> 41#include <asm/uaccess.h>
41 42
42#include <linux/dlm.h> 43#include <linux/dlm.h>
@@ -52,7 +53,6 @@ struct dlm_ls;
52struct dlm_lkb; 53struct dlm_lkb;
53struct dlm_rsb; 54struct dlm_rsb;
54struct dlm_member; 55struct dlm_member;
55struct dlm_lkbtable;
56struct dlm_rsbtable; 56struct dlm_rsbtable;
57struct dlm_dirtable; 57struct dlm_dirtable;
58struct dlm_direntry; 58struct dlm_direntry;
@@ -108,11 +108,6 @@ struct dlm_rsbtable {
108 spinlock_t lock; 108 spinlock_t lock;
109}; 109};
110 110
111struct dlm_lkbtable {
112 struct list_head list;
113 rwlock_t lock;
114 uint16_t counter;
115};
116 111
117/* 112/*
118 * Lockspace member (per node in a ls) 113 * Lockspace member (per node in a ls)
@@ -248,17 +243,18 @@ struct dlm_lkb {
248 int8_t lkb_wait_count; 243 int8_t lkb_wait_count;
249 int lkb_wait_nodeid; /* for debugging */ 244 int lkb_wait_nodeid; /* for debugging */
250 245
251 struct list_head lkb_idtbl_list; /* lockspace lkbtbl */
252 struct list_head lkb_statequeue; /* rsb g/c/w list */ 246 struct list_head lkb_statequeue; /* rsb g/c/w list */
253 struct list_head lkb_rsb_lookup; /* waiting for rsb lookup */ 247 struct list_head lkb_rsb_lookup; /* waiting for rsb lookup */
254 struct list_head lkb_wait_reply; /* waiting for remote reply */ 248 struct list_head lkb_wait_reply; /* waiting for remote reply */
255 struct list_head lkb_astqueue; /* need ast to be sent */
256 struct list_head lkb_ownqueue; /* list of locks for a process */ 249 struct list_head lkb_ownqueue; /* list of locks for a process */
257 struct list_head lkb_time_list; 250 struct list_head lkb_time_list;
258 ktime_t lkb_timestamp; 251 ktime_t lkb_timestamp;
259 ktime_t lkb_wait_time; 252 ktime_t lkb_wait_time;
260 unsigned long lkb_timeout_cs; 253 unsigned long lkb_timeout_cs;
261 254
255 struct mutex lkb_cb_mutex;
256 struct work_struct lkb_cb_work;
257 struct list_head lkb_cb_list; /* for ls_cb_delay or proc->asts */
262 struct dlm_callback lkb_callbacks[DLM_CALLBACKS_SIZE]; 258 struct dlm_callback lkb_callbacks[DLM_CALLBACKS_SIZE];
263 struct dlm_callback lkb_last_cast; 259 struct dlm_callback lkb_last_cast;
264 struct dlm_callback lkb_last_bast; 260 struct dlm_callback lkb_last_bast;
@@ -299,7 +295,7 @@ struct dlm_rsb {
299 int res_recover_locks_count; 295 int res_recover_locks_count;
300 296
301 char *res_lvbptr; 297 char *res_lvbptr;
302 char res_name[1]; 298 char res_name[DLM_RESNAME_MAXLEN+1];
303}; 299};
304 300
305/* find_rsb() flags */ 301/* find_rsb() flags */
@@ -465,12 +461,12 @@ struct dlm_ls {
465 unsigned long ls_scan_time; 461 unsigned long ls_scan_time;
466 struct kobject ls_kobj; 462 struct kobject ls_kobj;
467 463
464 struct idr ls_lkbidr;
465 spinlock_t ls_lkbidr_spin;
466
468 struct dlm_rsbtable *ls_rsbtbl; 467 struct dlm_rsbtable *ls_rsbtbl;
469 uint32_t ls_rsbtbl_size; 468 uint32_t ls_rsbtbl_size;
470 469
471 struct dlm_lkbtable *ls_lkbtbl;
472 uint32_t ls_lkbtbl_size;
473
474 struct dlm_dirtable *ls_dirtbl; 470 struct dlm_dirtable *ls_dirtbl;
475 uint32_t ls_dirtbl_size; 471 uint32_t ls_dirtbl_size;
476 472
@@ -483,6 +479,10 @@ struct dlm_ls {
483 struct mutex ls_timeout_mutex; 479 struct mutex ls_timeout_mutex;
484 struct list_head ls_timeout; 480 struct list_head ls_timeout;
485 481
482 spinlock_t ls_new_rsb_spin;
483 int ls_new_rsb_count;
484 struct list_head ls_new_rsb; /* new rsb structs */
485
486 struct list_head ls_nodes; /* current nodes in ls */ 486 struct list_head ls_nodes; /* current nodes in ls */
487 struct list_head ls_nodes_gone; /* dead node list, recovery */ 487 struct list_head ls_nodes_gone; /* dead node list, recovery */
488 int ls_num_nodes; /* number of nodes in ls */ 488 int ls_num_nodes; /* number of nodes in ls */
@@ -506,8 +506,12 @@ struct dlm_ls {
506 506
507 struct miscdevice ls_device; 507 struct miscdevice ls_device;
508 508
509 struct workqueue_struct *ls_callback_wq;
510
509 /* recovery related */ 511 /* recovery related */
510 512
513 struct mutex ls_cb_mutex;
514 struct list_head ls_cb_delay; /* save for queue_work later */
511 struct timer_list ls_timer; 515 struct timer_list ls_timer;
512 struct task_struct *ls_recoverd_task; 516 struct task_struct *ls_recoverd_task;
513 struct mutex ls_recoverd_active; 517 struct mutex ls_recoverd_active;
@@ -544,6 +548,7 @@ struct dlm_ls {
544#define LSFL_RCOM_WAIT 4 548#define LSFL_RCOM_WAIT 4
545#define LSFL_UEVENT_WAIT 5 549#define LSFL_UEVENT_WAIT 5
546#define LSFL_TIMEWARN 6 550#define LSFL_TIMEWARN 6
551#define LSFL_CB_DELAY 7
547 552
548/* much of this is just saving user space pointers associated with the 553/* much of this is just saving user space pointers associated with the
549 lock that we pass back to the user lib with an ast */ 554 lock that we pass back to the user lib with an ast */