Skip to content

Commit 0a0383a

Browse files
author
Andreas Gruenbacher
committed
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 <[email protected]>
1 parent 121e730 commit 0a0383a

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

fs/gfs2/glock.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,8 +1109,8 @@ static void glock_work_func(struct work_struct *work)
11091109
unsigned int drop_refs = 1;
11101110

11111111
spin_lock(&gl->gl_lockref.lock);
1112-
if (test_bit(GLF_REPLY_PENDING, &gl->gl_flags)) {
1113-
clear_bit(GLF_REPLY_PENDING, &gl->gl_flags);
1112+
if (test_bit(GLF_HAVE_REPLY, &gl->gl_flags)) {
1113+
clear_bit(GLF_HAVE_REPLY, &gl->gl_flags);
11141114
finish_xmote(gl, gl->gl_reply);
11151115
drop_refs++;
11161116
}
@@ -1642,7 +1642,7 @@ int gfs2_glock_nq(struct gfs2_holder *gh)
16421642
add_to_queue(gh);
16431643
if (unlikely((LM_FLAG_NOEXP & gh->gh_flags) &&
16441644
test_and_clear_bit(GLF_FROZEN, &gl->gl_flags))) {
1645-
set_bit(GLF_REPLY_PENDING, &gl->gl_flags);
1645+
set_bit(GLF_HAVE_REPLY, &gl->gl_flags);
16461646
gl->gl_lockref.count++;
16471647
gfs2_glock_queue_work(gl, 0);
16481648
}
@@ -1930,7 +1930,7 @@ void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state)
19301930
gl->gl_name.ln_type == LM_TYPE_INODE) {
19311931
if (time_before(now, holdtime))
19321932
delay = holdtime - now;
1933-
if (test_bit(GLF_REPLY_PENDING, &gl->gl_flags))
1933+
if (test_bit(GLF_HAVE_REPLY, &gl->gl_flags))
19341934
delay = gl->gl_hold_time;
19351935
}
19361936
handle_callback(gl, state, delay, true);
@@ -1993,7 +1993,7 @@ void gfs2_glock_complete(struct gfs2_glock *gl, int ret)
19931993
}
19941994

19951995
gl->gl_lockref.count++;
1996-
set_bit(GLF_REPLY_PENDING, &gl->gl_flags);
1996+
set_bit(GLF_HAVE_REPLY, &gl->gl_flags);
19971997
gfs2_glock_queue_work(gl, 0);
19981998
spin_unlock(&gl->gl_lockref.lock);
19991999
}
@@ -2186,7 +2186,7 @@ static void thaw_glock(struct gfs2_glock *gl)
21862186
return;
21872187

21882188
spin_lock(&gl->gl_lockref.lock);
2189-
set_bit(GLF_REPLY_PENDING, &gl->gl_flags);
2189+
set_bit(GLF_HAVE_REPLY, &gl->gl_flags);
21902190
gfs2_glock_queue_work(gl, 0);
21912191
spin_unlock(&gl->gl_lockref.lock);
21922192
}
@@ -2364,7 +2364,7 @@ static const char *gflags2str(char *buf, const struct gfs2_glock *gl)
23642364
*p++ = 'f';
23652365
if (test_bit(GLF_INVALIDATE_IN_PROGRESS, gflags))
23662366
*p++ = 'i';
2367-
if (test_bit(GLF_REPLY_PENDING, gflags))
2367+
if (test_bit(GLF_HAVE_REPLY, gflags))
23682368
*p++ = 'r';
23692369
if (test_bit(GLF_INITIAL, gflags))
23702370
*p++ = 'I';

fs/gfs2/incore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ enum {
322322
GLF_DIRTY = 6,
323323
GLF_LFLUSH = 7,
324324
GLF_INVALIDATE_IN_PROGRESS = 8,
325-
GLF_REPLY_PENDING = 9,
325+
GLF_HAVE_REPLY = 9,
326326
GLF_INITIAL = 10,
327327
GLF_FROZEN = 11,
328328
GLF_INSTANTIATE_IN_PROG = 12, /* instantiate happening now */

fs/gfs2/trace_gfs2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
{(1UL << GLF_DIRTY), "y" }, \
5454
{(1UL << GLF_LFLUSH), "f" }, \
5555
{(1UL << GLF_INVALIDATE_IN_PROGRESS), "i" }, \
56-
{(1UL << GLF_REPLY_PENDING), "r" }, \
56+
{(1UL << GLF_HAVE_REPLY), "r" }, \
5757
{(1UL << GLF_INITIAL), "I" }, \
5858
{(1UL << GLF_FROZEN), "F" }, \
5959
{(1UL << GLF_LRU), "L" }, \

0 commit comments

Comments
 (0)