aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/incore.h
diff options
context:
space:
mode:
authorWendy Cheng <wcheng@redhat.com>2007-10-05 00:27:58 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2008-01-25 03:07:09 -0500
commitcc7e79b168a552152299bd8a8254dc099aacc993 (patch)
tree65871c8ec495401846bc9e7030a89d3c6335f5ee /fs/gfs2/incore.h
parent49914084e797530d9baaf51df9eda77babc98fa8 (diff)
[GFS2] Handle multiple glock demote requests
Fix a race condition where multiple glock demote requests are sent to a node back-to-back. This patch does a check inside handle_callback() to see whether a demote request is in progress. If true, it sets a flag to make sure run_queue() will loop again to handle the new request, instead of erronously setting gl_demote_state to a different state. Signed-off-by: S. Wendy Cheng <wcheng@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r--fs/gfs2/incore.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index eaddfb5a8e6f..662182bfbff7 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -171,6 +171,7 @@ enum {
171 GLF_DEMOTE = 3, 171 GLF_DEMOTE = 3,
172 GLF_PENDING_DEMOTE = 4, 172 GLF_PENDING_DEMOTE = 4,
173 GLF_DIRTY = 5, 173 GLF_DIRTY = 5,
174 GLF_DEMOTE_IN_PROGRESS = 6,
174}; 175};
175 176
176struct gfs2_glock { 177struct gfs2_glock {
@@ -190,6 +191,7 @@ struct gfs2_glock {
190 struct list_head gl_holders; 191 struct list_head gl_holders;
191 struct list_head gl_waiters1; /* HIF_MUTEX */ 192 struct list_head gl_waiters1; /* HIF_MUTEX */
192 struct list_head gl_waiters3; /* HIF_PROMOTE */ 193 struct list_head gl_waiters3; /* HIF_PROMOTE */
194 int gl_waiters2; /* GIF_DEMOTE */
193 195
194 const struct gfs2_glock_operations *gl_ops; 196 const struct gfs2_glock_operations *gl_ops;
195 197