gfs2: Try harder to delete inodes locally
authorAndreas Gruenbacher <agruenba@redhat.com>
Tue, 14 Jan 2020 13:59:08 +0000 (14:59 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 5 Jun 2020 18:19:21 +0000 (20:19 +0200)
commit9e73330f298acf544de72436b7bb825ff3aa1a54
treed7a3fcd265d2b90b432398db215e7068ed453d0b
parent8c7b9262a8607636ecd7250f29c7aac17f08901c
gfs2: Try harder to delete inodes locally

When an inode's link count drops to zero and the inode is cached on
other nodes, the current behavior of gfs2 is to immediately give up and
to rely on the other node(s) to delete the inode if there is iopen glock
contention.  This leads to resource group glock bouncing and the loss of
caching.  With the previous patches in place, we can fix that by not
giving up immediately.

When the inode is still open on other nodes, those nodes won't be able
to evict the inode and give up the iopen glock.  In that case, our lock
conversion request will time out.  The unlink system call will block for
the duration of the iopen lock conversion request.  We're also holding
the inode glock in EX mode for an extended duration, so other nodes
won't be able to make progress on the inode, either.

This is worse than what we had before, but we can prevent other nodes
from getting stuck by aborting our iopen locking request if there is
contention on the inode glock.  This will the the subject of a future
patch.

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