ceph: try to queue a writeback if revoking fails
authorXiubo Li <xiubli@redhat.com>
Wed, 27 Apr 2022 06:14:41 +0000 (14:14 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 25 May 2022 18:45:14 +0000 (20:45 +0200)
commita74379543d229a3fb1af8cd44cbd19844a7bb1bc
tree221d7aa3ac65b546cf3bda7bc78096eafb0f291c
parent55ab5520802016b13098e0ea3794480289659aab
ceph: try to queue a writeback if revoking fails

If the pagecaches writeback just finished and the i_wrbuffer_ref
reaches zero it will try to trigger ceph_check_caps(). But if just
before ceph_check_caps() the i_wrbuffer_ref could be increased
again by mmap/cache write, then the Fwb revoke will fail.

We need to try to queue a writeback in this case instead of
triggering the writeback by BDI's delayed work per 5 seconds.

URL: https://tracker.ceph.com/issues/46904
URL: https://tracker.ceph.com/issues/55377
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c