From 89de9adbf2b7d446abe9a27c8e384d205a996176 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Fri, 26 Sep 2014 02:28:15 +0200 Subject: Do not hardcode umount(8) path, emulate lazy umount 1) Use a system-dependent macro for umount(8) location instead of relying on $PATH to find it, for security and portability sake. 2) Introduce gf_umount_lazy() to replace umount -l (-l for lazy) invocations, which is only supported on Linux; On Linux behavior in unchanged. On other systems, we fork an external process (umountd) that will take care of periodically attempt to unmount, and optionally rmdir. Backport of Ia91167c0652f8ddab85136324b08f87c5ac1edd51d BUG: 1138897 Change-Id: I9d82c87e85af0dee79f2de39bc697c486b7103c8 Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/8863 Tested-by: Gluster Build System Reviewed-by: Csaba Henk Reviewed-by: Vijay Bellur --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 583f500e961..ddc2cc5cc4e 100644 --- a/configure.ac +++ b/configure.ac @@ -200,6 +200,7 @@ AC_CONFIG_FILES([Makefile extras/hook-scripts/reset/post/Makefile extras/hook-scripts/reset/pre/Makefile contrib/fuse-util/Makefile + contrib/umountd/Makefile contrib/uuid/uuid_types.h glusterfs-api.pc libgfchangelog.pc @@ -896,6 +897,14 @@ case $host_os in ;; esac +# lazy umount emulation +UMOUNTD_SUBDIR="" +if test "x${GF_HOST_OS}" != "xGF_LINUX_HOST_OS" ; then + UMOUNTD_SUBDIR="contrib/umountd" +fi +AC_SUBST(UMOUNTD_SUBDIR) + + # enable/disable QEMU AM_CONDITIONAL([ENABLE_QEMU_BLOCK], [test x$BUILD_QEMU_BLOCK = xyes]) -- cgit