From dcda6114f7d689ec16c46b4a06df29c22747b874 Mon Sep 17 00:00:00 2001 From: Jakob Haufe Date: Tue, 30 Apr 2024 17:45:24 +0200 Subject: [PATCH] client: set LIBMOUNT_FORCE_MOUNT2=always This is a workaround for libmount 2.38 or later on linux kernel 5.1 or later. libmount defaults to the new fsconfig interface which does not support remounting the way the old mount(2) syscall did. Thus, dentry trimming fails. Fixes: https://tracker.ceph.com/issues/62664 Signed-off-by: Jakob Haufe (cherry picked from commit 9ca1d4be2b587ce1d3e6c10dc2a98195b2ab3ba9) --- src/client/fuse_ll.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index 0e2e200644d..67f8d8ea768 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -1266,7 +1266,7 @@ static int remount_cb(void *handle) // trims all unused dentries in the file system char cmd[128+PATH_MAX]; CephFuse::Handle *cfuse = (CephFuse::Handle *)handle; - snprintf(cmd, sizeof(cmd), "LIBMOUNT_FSTAB=/dev/null mount -i -o remount %s", + snprintf(cmd, sizeof(cmd), "LIBMOUNT_FSTAB=/dev/null LIBMOUNT_FORCE_MOUNT2=always mount -i -o remount %s", #if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0) cfuse->opts.mountpoint); #else -- 2.39.5