]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: set LIBMOUNT_FORCE_MOUNT2=always 58529/head
authorJakob Haufe <sur5r@sur5r.net>
Tue, 30 Apr 2024 15:45:24 +0000 (17:45 +0200)
committerJos Collin <jcollin@redhat.com>
Thu, 11 Jul 2024 01:43:19 +0000 (07:13 +0530)
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 <sur5r@sur5r.net>
(cherry picked from commit 9ca1d4be2b587ce1d3e6c10dc2a98195b2ab3ba9)

src/client/fuse_ll.cc

index 0e2e200644de63825e2fa3c17358c7851392d820..67f8d8ea7686a284baf54e00d8554c6ab4f9dc10 100644 (file)
@@ -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