From: Yan, Zheng Date: Tue, 31 Mar 2020 03:29:47 +0000 (+0800) Subject: ceph-fuse: don't get mount options from /etc/fstab when doing remount X-Git-Tag: v16.1.0~2696^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7aa22fac602b6e1c31943e2de69a2f8e3a3002d0;p=ceph.git ceph-fuse: don't get mount options from /etc/fstab when doing remount 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" --- diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index e21f27930e11..d9e226e8ccc0 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -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);