diff options
author | Bob Peterson <rpeterso@redhat.com> | 2019-04-05 04:41:38 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2019-05-07 23:39:14 +0200 |
commit | 73118ca8baf78dddd1f9c8ac67c1d80b47d9830e (patch) | |
tree | 72c0d2a327c8bace37ce5984f39d971ab5768594 /fs/gfs2/incore.h | |
parent | 9287c6452d2b1f24ea8e84bd3cf6f3c6f267f712 (diff) | |
download | lwn-73118ca8baf78dddd1f9c8ac67c1d80b47d9830e.tar.gz lwn-73118ca8baf78dddd1f9c8ac67c1d80b47d9830e.zip |
gfs2: Replace gl_revokes with a GLF flag
The gl_revokes value determines how many outstanding revokes a glock has
on the superblock revokes list; this is used to avoid unnecessary log
flushes. However, gl_revokes is only ever tested for being zero, and it's
only decremented in revoke_lo_after_commit, which removes all revokes
from the list, so we know that the gl_revoke values of all the glocks on
the list will reach zero. Therefore, we can replace gl_revokes with a
bit flag. This saves an atomic counter in struct gfs2_glock.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r-- | fs/gfs2/incore.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 86840a70ee1a..6a94b094a904 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -345,6 +345,7 @@ enum { GLF_OBJECT = 14, /* Used only for tracing */ GLF_BLOCKING = 15, GLF_INODE_CREATING = 16, /* Inode creation occurring */ + GLF_REVOKES = 17, /* Glock has revokes in queue */ }; struct gfs2_glock { @@ -374,7 +375,6 @@ struct gfs2_glock { struct list_head gl_lru; struct list_head gl_ail_list; atomic_t gl_ail_count; - atomic_t gl_revokes; struct delayed_work gl_work; union { /* For inode and iopen glocks only */ |