]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
gfs2: Give up the iopen glock on contention
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 13 Jan 2020 21:16:17 +0000 (22:16 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 5 Jun 2020 18:19:21 +0000 (20:19 +0200)
commit8c7b9262a8607636ecd7250f29c7aac17f08901c
tree29e3bd2e6accca33d93e7459a9ff5fbf3bbdd79b
parenta0e3cc65fa29f497cc97a069c318532c2a48d148
gfs2: Give up the iopen glock on contention

When there's contention on the iopen glock, it means that the link count
of the corresponding inode has dropped to zero on a remote node which is
now trying to delete the inode.  In that case, try to evict the inode so
that the iopen glock will be released, which will allow the remote node
to do its job.

When the inode is still open locally, the inode's reference count won't
drop to zero and so we'll keep holding the inode and its iopen glock.
The remote node will time out its request to grab the iopen glock, and
when the inode is finally closed locally, we'll try to delete it
ourself.

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