]> Gentwo Git Trees - linux/.git/commit
gfs2: Faster gfs2_upgrade_iopen_glock wakeups
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 9 Sep 2024 21:38:59 +0000 (23:38 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 5 Nov 2024 11:39:28 +0000 (12:39 +0100)
commitee51baa817eec7c5182c1e4450c4d1e8469faa96
tree814fcde110cb5469e4820c32eeff0d46f9df6e55
parentf9417fcfca3c5e30a0b961e7250fab92cfa5d123
gfs2: Faster gfs2_upgrade_iopen_glock wakeups

Move function needs_demote() to glock.h and rename it to
glock_needs_demote().  In handle_callback(), wake up the glock when
setting the GLF_PENDING_DEMOTE flag as well.  (Setting the GLF_DEMOTE
flag already triggered a wake-up.)

With that, check for glock_needs_demote() in gfs2_upgrade_iopen_glock()
to wake up when either of those flags is set for the inode glock: the
faster we can react to contention, the better.

The GLF_PENDING_DEMOTE flag is only used for inode glocks (see
gfs2_glock_cb()) so it's okay to only check for the GLF_DEMOTE flag in
gfs2_drop_inode().  Still, using glock_needs_demote() there as well
makes the code a little easier to read.

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