aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/locking/dlm/lock_dlm.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-05-21 12:21:42 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2008-06-27 04:39:25 -0400
commitf3c9d38a26be32abf9b8897e9e0afc7166c712dd (patch)
tree01b892d0d01720a396589c1f537dd0997128a060 /fs/gfs2/locking/dlm/lock_dlm.h
parent6802e3400ff4549525930ee744030c36fce9cc73 (diff)
[GFS2] Fix ordering bug in lock_dlm
This looks like a lot of change, but in fact its not. Mostly its things moving from one file to another. The change is just that instead of queuing lock completions and callbacks from the DLM we now pass them directly to GFS2. This gives us a net loss of two list heads per glock (a fair saving in memory) plus a reduction in the latency of delivering the messages to GFS2, plus we now have one thread fewer as well. There was a bug where callbacks and completions could be delivered in the wrong order due to this unnecessary queuing which is fixed by this patch. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/locking/dlm/lock_dlm.h')
-rw-r--r--fs/gfs2/locking/dlm/lock_dlm.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/gfs2/locking/dlm/lock_dlm.h b/fs/gfs2/locking/dlm/lock_dlm.h
index a243cf69c54e..ad944c64eab1 100644
--- a/fs/gfs2/locking/dlm/lock_dlm.h
+++ b/fs/gfs2/locking/dlm/lock_dlm.h
@@ -72,15 +72,12 @@ struct gdlm_ls {
72 int recover_jid_done; 72 int recover_jid_done;
73 int recover_jid_status; 73 int recover_jid_status;
74 spinlock_t async_lock; 74 spinlock_t async_lock;
75 struct list_head complete;
76 struct list_head blocking;
77 struct list_head delayed; 75 struct list_head delayed;
78 struct list_head submit; 76 struct list_head submit;
79 struct list_head all_locks; 77 struct list_head all_locks;
80 u32 all_locks_count; 78 u32 all_locks_count;
81 wait_queue_head_t wait_control; 79 wait_queue_head_t wait_control;
82 struct task_struct *thread1; 80 struct task_struct *thread;
83 struct task_struct *thread2;
84 wait_queue_head_t thread_wait; 81 wait_queue_head_t thread_wait;
85 unsigned long drop_time; 82 unsigned long drop_time;
86 int drop_locks_count; 83 int drop_locks_count;
@@ -117,10 +114,6 @@ struct gdlm_lock {
117 u32 lkf; /* dlm flags DLM_LKF_ */ 114 u32 lkf; /* dlm flags DLM_LKF_ */
118 unsigned long flags; /* lock_dlm flags LFL_ */ 115 unsigned long flags; /* lock_dlm flags LFL_ */
119 116
120 int bast_mode; /* protected by async_lock */
121
122 struct list_head clist; /* complete */
123 struct list_head blist; /* blocking */
124 struct list_head delay_list; /* delayed */ 117 struct list_head delay_list; /* delayed */
125 struct list_head all_list; /* all locks for the fs */ 118 struct list_head all_list; /* all locks for the fs */
126 struct gdlm_lock *hold_null; /* NL lock for hold_lvb */ 119 struct gdlm_lock *hold_null; /* NL lock for hold_lvb */
@@ -159,11 +152,8 @@ void gdlm_release_threads(struct gdlm_ls *);
159 152
160/* lock.c */ 153/* lock.c */
161 154
162s16 gdlm_make_lmstate(s16);
163void gdlm_queue_delayed(struct gdlm_lock *);
164void gdlm_submit_delayed(struct gdlm_ls *); 155void gdlm_submit_delayed(struct gdlm_ls *);
165int gdlm_release_all_locks(struct gdlm_ls *); 156int gdlm_release_all_locks(struct gdlm_ls *);
166void gdlm_delete_lp(struct gdlm_lock *);
167unsigned int gdlm_do_lock(struct gdlm_lock *); 157unsigned int gdlm_do_lock(struct gdlm_lock *);
168 158
169int gdlm_get_lock(void *, struct lm_lockname *, void **); 159int gdlm_get_lock(void *, struct lm_lockname *, void **);