]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-fuse: don't get mount options from /etc/fstab when doing remount 34306/head
authorYan, Zheng <zyan@redhat.com>
Tue, 31 Mar 2020 03:29:47 +0000 (11:29 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 31 Mar 2020 03:47:51 +0000 (11:47 +0800)
If there happen to be an kcephfs entry in /etc/fstab for ceph-fuse's
mount point. 'mount -o remount' may get options from that entry. fuse
may not understand some options (E.g name option).

Fixes: https://tracker.ceph.com/issues/44771
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/client/fuse_ll.cc

index e21f27930e115dd0dee57fe30588db20e436d771..d9e226e8ccc0479dc409510ef4c6671247c801ca 100644 (file)
@@ -941,7 +941,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), "mount -i -o remount %s", cfuse->mountpoint);
+  snprintf(cmd, sizeof(cmd), "LIBMOUNT_FSTAB=/dev/null mount -i -o remount %s", cfuse->mountpoint);
   int r = system(cmd);
   if (r != 0 && r != -1) {
     r = WEXITSTATUS(r);