mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 05:45:20 +00:00
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: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
121e730112
commit
0a0383a93e
@ -1109,8 +1109,8 @@ static void glock_work_func(struct work_struct *work)
|
||||
unsigned int drop_refs = 1;
|
||||
|
||||
spin_lock(&gl->gl_lockref.lock);
|
||||
if (test_bit(GLF_REPLY_PENDING, &gl->gl_flags)) {
|
||||
clear_bit(GLF_REPLY_PENDING, &gl->gl_flags);
|
||||
if (test_bit(GLF_HAVE_REPLY, &gl->gl_flags)) {
|
||||
clear_bit(GLF_HAVE_REPLY, &gl->gl_flags);
|
||||
finish_xmote(gl, gl->gl_reply);
|
||||
drop_refs++;
|
||||
}
|
||||
@ -1642,7 +1642,7 @@ unlock:
|
||||
add_to_queue(gh);
|
||||
if (unlikely((LM_FLAG_NOEXP & gh->gh_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++;
|
||||
gfs2_glock_queue_work(gl, 0);
|
||||
}
|
||||
@ -1930,7 +1930,7 @@ void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state)
|
||||
gl->gl_name.ln_type == LM_TYPE_INODE) {
|
||||
if (time_before(now, holdtime))
|
||||
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;
|
||||
}
|
||||
handle_callback(gl, state, delay, true);
|
||||
@ -1993,7 +1993,7 @@ void gfs2_glock_complete(struct gfs2_glock *gl, int ret)
|
||||
}
|
||||
|
||||
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);
|
||||
spin_unlock(&gl->gl_lockref.lock);
|
||||
}
|
||||
@ -2186,7 +2186,7 @@ static void thaw_glock(struct gfs2_glock *gl)
|
||||
return;
|
||||
|
||||
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);
|
||||
spin_unlock(&gl->gl_lockref.lock);
|
||||
}
|
||||
@ -2364,7 +2364,7 @@ static const char *gflags2str(char *buf, const struct gfs2_glock *gl)
|
||||
*p++ = 'f';
|
||||
if (test_bit(GLF_INVALIDATE_IN_PROGRESS, gflags))
|
||||
*p++ = 'i';
|
||||
if (test_bit(GLF_REPLY_PENDING, gflags))
|
||||
if (test_bit(GLF_HAVE_REPLY, gflags))
|
||||
*p++ = 'r';
|
||||
if (test_bit(GLF_INITIAL, gflags))
|
||||
*p++ = 'I';
|
||||
|
@ -322,7 +322,7 @@ enum {
|
||||
GLF_DIRTY = 6,
|
||||
GLF_LFLUSH = 7,
|
||||
GLF_INVALIDATE_IN_PROGRESS = 8,
|
||||
GLF_REPLY_PENDING = 9,
|
||||
GLF_HAVE_REPLY = 9,
|
||||
GLF_INITIAL = 10,
|
||||
GLF_FROZEN = 11,
|
||||
GLF_INSTANTIATE_IN_PROG = 12, /* instantiate happening now */
|
||||
|
@ -53,7 +53,7 @@
|
||||
{(1UL << GLF_DIRTY), "y" }, \
|
||||
{(1UL << GLF_LFLUSH), "f" }, \
|
||||
{(1UL << GLF_INVALIDATE_IN_PROGRESS), "i" }, \
|
||||
{(1UL << GLF_REPLY_PENDING), "r" }, \
|
||||
{(1UL << GLF_HAVE_REPLY), "r" }, \
|
||||
{(1UL << GLF_INITIAL), "I" }, \
|
||||
{(1UL << GLF_FROZEN), "F" }, \
|
||||
{(1UL << GLF_LRU), "L" }, \
|
||||
|
Loading…
x
Reference in New Issue
Block a user