]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
gfs2: Smarter iopen glock waiting
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 17 Jan 2020 09:53:23 +0000 (10:53 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 5 Jun 2020 18:19:21 +0000 (20:19 +0200)
commit9e8990dea9266af68a668b1503dc6f55c56f1bb6
treec7b03bee78fe07cde65ba2a847cae10be0bcb0f0
parent35b6f8fbcf9b2ebdee0a0f77143a8d203a9616e1
gfs2: Smarter iopen glock waiting

When trying to upgrade the iopen glock from a shared to an exclusive lock in
gfs2_evict_inode, abort the wait if there is contention on the corresponding
inode glock: in that case, the inode must still be in active use on another
node, and we're not guaranteed to get the iopen glock anytime soon.

To make this work even better, when we notice contention on the iopen glock and
we can't evict the corresponsing inode and release the iopen glock immediately,
poke the inode glock.  The other node(s) trying to acquire the lock can then
abort instead of timing out.

Thanks to Heinz Mauelshagen for pointing out a locking bug in a previous
version of this patch.

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