From 461888bb63b2409f8245c7766aa799ca22f734e6 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Tue, 9 May 2017 19:26:40 +0200 Subject: fuse: implement "-oauto_unmount" libfuse has an auto_unmount option which, if enabled, ensures that the file system is unmounted at FUSE server termination by running a separate monitor process that performs the unmount when that occurs. (This feature would probably better be called "robust auto-unmount", as FUSE servers usually do try to unmount their file systems upon termination, it's just this mechanism is not crash resilient.) This change implements that option and behavior for glusterfs. Note that "auto unmount" (robust or not) is a leaky abstraction, as the kernel cannot guarantee that at the path where the FUSE fs is mounted is actually the toplevel mount at the time of the umount(2) call, for multiple reasons, among others, see: fuse-devel: "fuse: feasible to distinguish between umount and abort?" http://fuse.996288.n3.nabble.com/fuse-feasible-to-distinguish-between-umount-and-abort-tt14358.html https://github.com/libfuse/libfuse/issues/122 Updates #153 Change-Id: Ia4432580c9fd2c156d9c73c3a44f4bfd42437599 Signed-off-by: Csaba Henk Reviewed-on: https://review.gluster.org/17230 Tested-by: Amar Tumballi CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Amar Tumballi NetBSD-regression: NetBSD Build System --- xlators/mount/fuse/utils/mount.glusterfs.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/mount/fuse/utils/mount.glusterfs.in') diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index b5c90ba1dff..66dd7cd960f 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -562,7 +562,7 @@ without_options() "atime"|"noatime"|"diratime"|"nodiratime"|\ "relatime"|"norelatime"|\ "strictatime"|"nostrictatime"|"lazyatime"|"nolazyatime"|\ - "dev"|"nodev"|"exec"|"noexec"|"suid"|"nosuid") + "dev"|"nodev"|"exec"|"noexec"|"suid"|"nosuid"|"auto_unmount") [ -z "$fuse_mountopts" ] || fuse_mountopts="$fuse_mountopts," fuse_mountopts="${fuse_mountopts}${option}" ;; -- cgit