]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph_fuse: make it to force invalidating dentries when kernel >=3.18
authorXiubo Li <xiubli@redhat.com>
Wed, 19 Oct 2022 08:44:04 +0000 (16:44 +0800)
committerXiubo Li <xiubli@redhat.com>
Mon, 30 Jan 2023 07:34:57 +0000 (15:34 +0800)
The remount will fail randomly for unknown reasons. And in certain
circumstance we can reprodce this very easy, which will block our
testing. Make it posible to force to old method to invalidate the
dcache when the "client_try_dentry_invalidate" option is enabled
even kernel version >= 3.18.0

Fixes: https://tracker.ceph.com/issues/56532
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/ceph_fuse.cc

index aae412694038e314069b8ce52ef666f22c8e564e..3fa5346b4634d4729ee15894cd7fd101ae6e8ec3 100644 (file)
@@ -198,12 +198,8 @@ int main(int argc, const char **argv, const char *envp[]) {
       ~RemountTest() override {}
       void *entry() override {
 #if defined(__linux__)
-       int ver = get_linux_version();
-       ceph_assert(ver != 0);
-        bool client_try_dentry_invalidate = g_conf().get_val<bool>(
-          "client_try_dentry_invalidate");
-        bool can_invalidate_dentries =
-          client_try_dentry_invalidate && ver < KERNEL_VERSION(3, 18, 0);
+        bool can_invalidate_dentries = g_conf().get_val<bool>(
+         "client_try_dentry_invalidate");
         uint64_t max_retries = g_conf().get_val<uint64_t>(
           "client_max_retries_on_remount_failure");
         std::pair<int, bool> test_result;