From: Xiubo Li Date: Wed, 19 Oct 2022 08:44:04 +0000 (+0800) Subject: ceph_fuse: make it to force invalidating dentries when kernel >=3.18 X-Git-Tag: v16.2.12~3^2~53^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c8078f1b57c1fd59b305f5b72e5dafd5000b13ff;p=ceph.git ceph_fuse: make it to force invalidating dentries when kernel >=3.18 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 (cherry picked from commit f9c78fe72f3d7c02e927f71e0fbd841605c42708) --- diff --git a/src/ceph_fuse.cc b/src/ceph_fuse.cc index e2d384a787bc4..ea941e9cc4651 100644 --- a/src/ceph_fuse.cc +++ b/src/ceph_fuse.cc @@ -197,12 +197,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( - "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( + "client_try_dentry_invalidate"); uint64_t max_retries = g_conf().get_val( "client_max_retries_on_remount_failure"); std::pair test_result;