From: Xiubo Li Date: Mon, 15 Aug 2022 07:15:43 +0000 (+0800) Subject: client: abort the client if we couldn't invalidate dentry caches X-Git-Tag: v16.2.11~293^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F48109%2Fhead;p=ceph.git client: abort the client if we couldn't invalidate dentry caches The option 'client_die_on_failed_dentry_invalidate' requires to kill the client when fails to invalidate the dentry caches from kernel. The CephFS client requires a mechanism to invalidate dentries in the caller (e.g. the kernel for ceph-fuse) when capabilities must be recalled. If the client cannot do this then the MDS cache cannot shrink which can cause the MDS to fail. Introduced by commit 8c778e79840f1aa9b9731e2ef20881da0d122fda. Fixes: https://tracker.ceph.com/issues/57126 Signed-off-by: Xiubo Li (cherry picked from commit c8140cdeab5a5cc88da94e697b97b107155a601c) --- diff --git a/src/client/Client.cc b/src/client/Client.cc index df5021af1712..17ed5e781248 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -4439,7 +4439,10 @@ public: explicit C_Client_Remount(Client *c) : client(c) {} void finish(int r) override { ceph_assert(r == 0); - client->_do_remount(true); + auto result = client->_do_remount(true); + if (result.second) { + ceph_abort(); + } } };