]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: abort the client if we couldn't invalidate dentry caches 47593/head
authorXiubo Li <xiubli@redhat.com>
Mon, 15 Aug 2022 07:15:43 +0000 (15:15 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 17 Aug 2022 12:46:43 +0000 (20:46 +0800)
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 <xiubli@redhat.com>
src/client/Client.cc

index 539b7b2d5a16db48684b65fc4c6367212dee251b..cf07af0108dc90ee30225c67005307da710e228d 100644 (file)
@@ -4583,7 +4583,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();
+    }
   }
 };