Commit 0a0383a9 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher

gfs2: Rename GLF_REPLY_PENDING to GLF_HAVE_REPLY

The GLF_REPLY_PENDING flag indicates to glock_work_func() that in
response to a locking request, DLM has sent a reply that needs to be
processed.  A flag with that name could as well indicate that we are
waiting on a reply from DLM, however.  To disambiguate these two cases,
rename the flag to GLF_HAVE_REPLY.
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 121e7301
...@@ -1109,8 +1109,8 @@ static void glock_work_func(struct work_struct *work) ...@@ -1109,8 +1109,8 @@ static void glock_work_func(struct work_struct *work)
unsigned int drop_refs = 1; unsigned int drop_refs = 1;
spin_lock(&gl->gl_lockref.lock); spin_lock(&gl->gl_lockref.lock);
if (test_bit(GLF_REPLY_PENDING, &gl->gl_flags)) { if (test_bit(GLF_HAVE_REPLY, &gl->gl_flags)) {
clear_bit(GLF_REPLY_PENDING, &gl->gl_flags); clear_bit(GLF_HAVE_REPLY, &gl->gl_flags);
finish_xmote(gl, gl->gl_reply); finish_xmote(gl, gl->gl_reply);
drop_refs++; drop_refs++;
} }
...@@ -1642,7 +1642,7 @@ int gfs2_glock_nq(struct gfs2_holder *gh) ...@@ -1642,7 +1642,7 @@ int gfs2_glock_nq(struct gfs2_holder *gh)
add_to_queue(gh); add_to_queue(gh);
if (unlikely((LM_FLAG_NOEXP & gh->gh_flags) && if (unlikely((LM_FLAG_NOEXP & gh->gh_flags) &&
test_and_clear_bit(GLF_FROZEN, &gl->gl_flags))) { test_and_clear_bit(GLF_FROZEN, &gl->gl_flags))) {
set_bit(GLF_REPLY_PENDING, &gl->gl_flags); set_bit(GLF_HAVE_REPLY, &gl->gl_flags);
gl->gl_lockref.count++; gl->gl_lockref.count++;
gfs2_glock_queue_work(gl, 0); gfs2_glock_queue_work(gl, 0);
} }
...@@ -1930,7 +1930,7 @@ void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state) ...@@ -1930,7 +1930,7 @@ void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state)
gl->gl_name.ln_type == LM_TYPE_INODE) { gl->gl_name.ln_type == LM_TYPE_INODE) {
if (time_before(now, holdtime)) if (time_before(now, holdtime))
delay = holdtime - now; delay = holdtime - now;
if (test_bit(GLF_REPLY_PENDING, &gl->gl_flags)) if (test_bit(GLF_HAVE_REPLY, &gl->gl_flags))
delay = gl->gl_hold_time; delay = gl->gl_hold_time;
} }
handle_callback(gl, state, delay, true); handle_callback(gl, state, delay, true);
...@@ -1993,7 +1993,7 @@ void gfs2_glock_complete(struct gfs2_glock *gl, int ret) ...@@ -1993,7 +1993,7 @@ void gfs2_glock_complete(struct gfs2_glock *gl, int ret)
} }
gl->gl_lockref.count++; gl->gl_lockref.count++;
set_bit(GLF_REPLY_PENDING, &gl->gl_flags); set_bit(GLF_HAVE_REPLY, &gl->gl_flags);
gfs2_glock_queue_work(gl, 0); gfs2_glock_queue_work(gl, 0);
spin_unlock(&gl->gl_lockref.lock); spin_unlock(&gl->gl_lockref.lock);
} }
...@@ -2186,7 +2186,7 @@ static void thaw_glock(struct gfs2_glock *gl) ...@@ -2186,7 +2186,7 @@ static void thaw_glock(struct gfs2_glock *gl)
return; return;
spin_lock(&gl->gl_lockref.lock); spin_lock(&gl->gl_lockref.lock);
set_bit(GLF_REPLY_PENDING, &gl->gl_flags); set_bit(GLF_HAVE_REPLY, &gl->gl_flags);
gfs2_glock_queue_work(gl, 0); gfs2_glock_queue_work(gl, 0);
spin_unlock(&gl->gl_lockref.lock); spin_unlock(&gl->gl_lockref.lock);
} }
...@@ -2364,7 +2364,7 @@ static const char *gflags2str(char *buf, const struct gfs2_glock *gl) ...@@ -2364,7 +2364,7 @@ static const char *gflags2str(char *buf, const struct gfs2_glock *gl)
*p++ = 'f'; *p++ = 'f';
if (test_bit(GLF_INVALIDATE_IN_PROGRESS, gflags)) if (test_bit(GLF_INVALIDATE_IN_PROGRESS, gflags))
*p++ = 'i'; *p++ = 'i';
if (test_bit(GLF_REPLY_PENDING, gflags)) if (test_bit(GLF_HAVE_REPLY, gflags))
*p++ = 'r'; *p++ = 'r';
if (test_bit(GLF_INITIAL, gflags)) if (test_bit(GLF_INITIAL, gflags))
*p++ = 'I'; *p++ = 'I';
......
...@@ -322,7 +322,7 @@ enum { ...@@ -322,7 +322,7 @@ enum {
GLF_DIRTY = 6, GLF_DIRTY = 6,
GLF_LFLUSH = 7, GLF_LFLUSH = 7,
GLF_INVALIDATE_IN_PROGRESS = 8, GLF_INVALIDATE_IN_PROGRESS = 8,
GLF_REPLY_PENDING = 9, GLF_HAVE_REPLY = 9,
GLF_INITIAL = 10, GLF_INITIAL = 10,
GLF_FROZEN = 11, GLF_FROZEN = 11,
GLF_INSTANTIATE_IN_PROG = 12, /* instantiate happening now */ GLF_INSTANTIATE_IN_PROG = 12, /* instantiate happening now */
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
{(1UL << GLF_DIRTY), "y" }, \ {(1UL << GLF_DIRTY), "y" }, \
{(1UL << GLF_LFLUSH), "f" }, \ {(1UL << GLF_LFLUSH), "f" }, \
{(1UL << GLF_INVALIDATE_IN_PROGRESS), "i" }, \ {(1UL << GLF_INVALIDATE_IN_PROGRESS), "i" }, \
{(1UL << GLF_REPLY_PENDING), "r" }, \ {(1UL << GLF_HAVE_REPLY), "r" }, \
{(1UL << GLF_INITIAL), "I" }, \ {(1UL << GLF_INITIAL), "I" }, \
{(1UL << GLF_FROZEN), "F" }, \ {(1UL << GLF_FROZEN), "F" }, \
{(1UL << GLF_LRU), "L" }, \ {(1UL << GLF_LRU), "L" }, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment