ceph: flush release queue when handling caps for unknown inode ceph-for-5.7-rc8
authorJeff Layton <jlayton@kernel.org>
Wed, 20 May 2020 14:36:07 +0000 (10:36 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 27 May 2020 11:03:57 +0000 (13:03 +0200)
commitfb33c114d3ed5bdac230716f5b0a93b56b92a90d
tree95fabf81bd8b03e209e535b9ed92b1ab3f880ef7
parent890bd0f8997ae6ac0a367dd5146154a3963306dd
ceph: flush release queue when handling caps for unknown inode

It's possible for the VFS to completely forget about an inode, but for
it to still be sitting on the cap release queue. If the MDS sends the
client a cap message for such an inode, it just ignores it today, which
can lead to a stall of up to 5s until the cap release queue is flushed.

If we get a cap message for an inode that can't be located, then go
ahead and flush the cap release queue.

Cc: stable@vger.kernel.org
URL: https://tracker.ceph.com/issues/45532
Fixes: 1e9c2eb6811e ("ceph: delete stale dentry when last reference is dropped")
Reported-and-Tested-by: Andrej Filipčič <andrej.filipcic@ijs.si>
Suggested-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c