]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gfs2: Invert the GLF_INITIAL flag
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 3 Apr 2024 05:09:30 +0000 (07:09 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 29 May 2024 13:34:55 +0000 (15:34 +0200)
commitc8758ad005c98b15cd8b7a559dc51f8ddbc56d0a
tree6d441546832ebcb9149a1f7cc47a87dc09e390ae
parentc8cf2d9f189bf53beefd53b90cc65c556d16dd5a
gfs2: Invert the GLF_INITIAL flag

Invert the meaning of the GLF_INITIAL flag: right now, when GLF_INITIAL
is set, a DLM lock exists and we have a valid identifier for it; when
GLF_INITIAL is cleared, no DLM lock exists (yet).  This is confusing.
In addition, it makes more sense to highlight the exceptional case
(i.e., no DLM lock exists yet) in glock dumps and trace points than to
highlight the common case.

To avoid confusion between the "old" and the "new" meaning of the flag,
use 'a' instead of 'I' to represent the flag.

For improved code consistency, check if the GLF_INITIAL flag is cleared
to determine whether a DLM lock exists instead of checking if the lock
identifier is non-zero.

Document what the flag is used for.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c
fs/gfs2/lock_dlm.c
fs/gfs2/trace_gfs2.h