Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211625
b: refs/heads/master
c: 7b5e3d5
h: refs/heads/master
i:
  211623: c1d5664
v: v3
  • Loading branch information
Steven Whitehouse committed Sep 20, 2010
1 parent bac4f93 commit 5d07c73
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe08d5a89726675a920b0e9bbbe849c46b27a6e5
refs/heads/master: 7b5e3d5fcf0d6fce66050bd0313a7dc2ae4abc62
15 changes: 11 additions & 4 deletions trunk/fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ static void state_change(struct gfs2_glock *gl, unsigned int new_state)
else
gfs2_glock_put_nolock(gl);
}
if (held1 && held2 && list_empty(&gl->gl_holders))
clear_bit(GLF_QUEUED, &gl->gl_flags);

gl->gl_state = new_state;
gl->gl_tchange = jiffies;
Expand Down Expand Up @@ -1012,6 +1014,7 @@ __acquires(&gl->gl_spin)
if (unlikely((gh->gh_flags & LM_FLAG_PRIORITY) && !insert_pt))
insert_pt = &gh2->gh_list;
}
set_bit(GLF_QUEUED, &gl->gl_flags);
if (likely(insert_pt == NULL)) {
list_add_tail(&gh->gh_list, &gl->gl_holders);
if (unlikely(gh->gh_flags & LM_FLAG_PRIORITY))
Expand Down Expand Up @@ -1310,10 +1313,12 @@ void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state)

gfs2_glock_hold(gl);
holdtime = gl->gl_tchange + gl->gl_ops->go_min_hold_time;
if (time_before(now, holdtime))
delay = holdtime - now;
if (test_bit(GLF_REPLY_PENDING, &gl->gl_flags))
delay = gl->gl_ops->go_min_hold_time;
if (test_bit(GLF_QUEUED, &gl->gl_flags)) {
if (time_before(now, holdtime))
delay = holdtime - now;
if (test_bit(GLF_REPLY_PENDING, &gl->gl_flags))
delay = gl->gl_ops->go_min_hold_time;
}

spin_lock(&gl->gl_spin);
handle_callback(gl, state, delay);
Expand Down Expand Up @@ -1660,6 +1665,8 @@ static const char *gflags2str(char *buf, const unsigned long *gflags)
*p++ = 'I';
if (test_bit(GLF_FROZEN, gflags))
*p++ = 'F';
if (test_bit(GLF_QUEUED, gflags))
*p++ = 'q';
*p = 0;
return buf;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/gfs2/incore.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ enum {
GLF_REPLY_PENDING = 9,
GLF_INITIAL = 10,
GLF_FROZEN = 11,
GLF_QUEUED = 12,
};

struct gfs2_glock {
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/gfs2/trace_gfs2.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
{(1UL << GLF_INVALIDATE_IN_PROGRESS), "i" }, \
{(1UL << GLF_REPLY_PENDING), "r" }, \
{(1UL << GLF_INITIAL), "I" }, \
{(1UL << GLF_FROZEN), "F" })
{(1UL << GLF_FROZEN), "F" }, \
{(1UL << GLF_QUEUED), "q" })

#ifndef NUMPTY
#define NUMPTY
Expand Down

0 comments on commit 5d07c73

Please sign in to comment.