summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/trace_gfs2.h
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2020-10-12 20:57:37 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2020-10-15 17:04:53 +0200
commite2c6c8a797eea88b267743d99d593d368aa43481 (patch)
treeaca3a8209bc80bc402d9c11232d86a58ce743594 /fs/gfs2/trace_gfs2.h
parentgfs2: Ignore journal log writes for jdata holes (diff)
downloadlinux-e2c6c8a797eea88b267743d99d593d368aa43481.tar.xz
linux-e2c6c8a797eea88b267743d99d593d368aa43481.zip
gfs2: eliminate GLF_QUEUED flag in favor of list_empty(gl_holders)
Before this patch, glock.c maintained a flag, GLF_QUEUED, which indicated when a glock had a holder queued. It was only checked for inode glocks, although set and cleared by all glocks, and it was only used to determine whether the glock should be held for the minimum hold time before releasing. The problem is that the flag is not accurate at all. If a process holds the glock, the flag is set. When they dequeue the glock, it only cleared the flag in cases when the state actually changed. So if the state doesn't change, the flag may still be set, even when nothing is queued. This happens to iopen glocks often: the get held in SH, then the file is closed, but the glock remains in SH mode. We don't need a special flag to indicate this: we can simply tell whether the glock has any items queued to the holders queue. It's a waste of cpu time to maintain it. This patch eliminates the flag in favor of simply checking list_empty on the glock holders. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/trace_gfs2.h')
-rw-r--r--fs/gfs2/trace_gfs2.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h
index fe140ceef74d..0b2f858d9a8c 100644
--- a/fs/gfs2/trace_gfs2.h
+++ b/fs/gfs2/trace_gfs2.h
@@ -56,7 +56,6 @@
{(1UL << GLF_REPLY_PENDING), "r" }, \
{(1UL << GLF_INITIAL), "I" }, \
{(1UL << GLF_FROZEN), "F" }, \
- {(1UL << GLF_QUEUED), "q" }, \
{(1UL << GLF_LRU), "L" }, \
{(1UL << GLF_OBJECT), "o" }, \
{(1UL << GLF_BLOCKING), "b" })