mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
configure: use_lvmetad/polld configurable
Configure provides proper settings for use_lvmetad and use_lvmpolld conf setttings. When the build of polld & lvmetad, these settings are enabled by default unless explicitelly disabled with --disable-use-lvmetad/--disable-use-lvmpolld.
This commit is contained in:
parent
1806694928
commit
725136b57e
@ -1,5 +1,6 @@
|
||||
Version 2.02.120 -
|
||||
===============================
|
||||
Configure lvm.conf for use_lvmetad and use_lvmpolld.
|
||||
Add lvpoll for cmdline communication with lvmpolld.
|
||||
Add lvmpolld acting as a free-standing version of polldaemon.
|
||||
Properly validate PV size for pvcreate --restorefile.
|
||||
|
@ -820,7 +820,7 @@ global {
|
||||
# lvmetad is not compatible with locking_type 3 (clustering).
|
||||
# LVM prints warnings and ignores lvmetad if this combination
|
||||
# is seen.
|
||||
use_lvmetad = 0
|
||||
use_lvmetad = @DEFAULT_USE_LVMETAD@
|
||||
|
||||
# Configuration option global/thin_check_executable.
|
||||
# The full path to the thin_check command.
|
||||
@ -947,7 +947,7 @@ global {
|
||||
# spawned in lvmpolld's service cgroup.
|
||||
#
|
||||
# When set to 0 lvm falls back to classical polling.
|
||||
use_lvmpolld = 0
|
||||
use_lvmpolld = @DEFAULT_USE_LVMPOLLD@
|
||||
}
|
||||
|
||||
# Configuration section activation.
|
||||
|
50
configure
vendored
50
configure
vendored
@ -700,6 +700,8 @@ DMEVENTD_PATH
|
||||
DMEVENTD
|
||||
DL_LIBS
|
||||
DEVMAPPER
|
||||
DEFAULT_USE_LVMPOLLD
|
||||
DEFAULT_USE_LVMETAD
|
||||
DEFAULT_SYS_DIR
|
||||
DEFAULT_SPARSE_SEGTYPE
|
||||
DEFAULT_RUN_DIR
|
||||
@ -915,8 +917,10 @@ enable_testing
|
||||
enable_valgrind_pool
|
||||
enable_devmapper
|
||||
enable_lvmetad
|
||||
enable_use_lvmetad
|
||||
with_lvmetad_pidfile
|
||||
enable_lvmpolld
|
||||
enable_use_lvmpolld
|
||||
with_lvmpolld_pidfile
|
||||
enable_blkid_wiping
|
||||
enable_udev_systemd_background_jobs
|
||||
@ -1631,7 +1635,9 @@ Optional Features:
|
||||
--enable-valgrind-pool enable valgrind awareness of pools
|
||||
--disable-devmapper disable LVM2 device-mapper interaction
|
||||
--enable-lvmetad enable the LVM Metadata Daemon
|
||||
--disable-use-lvmetad disable usage of LVM Metadata Daemon
|
||||
--enable-lvmpolld enable the LVM Polling Daemon
|
||||
--disable-use-lvmpolld disable usage of LVM Poll Daemon
|
||||
--disable-blkid_wiping disable libblkid detection of signatures when wiping
|
||||
and use native code instead
|
||||
--disable-udev-systemd-background-jobs
|
||||
@ -10844,6 +10850,20 @@ $as_echo "$LVMETAD" >&6; }
|
||||
BUILD_LVMETAD=$LVMETAD
|
||||
|
||||
if test "$BUILD_LVMETAD" = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmetad" >&5
|
||||
$as_echo_n "checking defaults for use_lvmetad... " >&6; }
|
||||
# Check whether --enable-use_lvmetad was given.
|
||||
if test "${enable_use_lvmetad+set}" = set; then :
|
||||
enableval=$enable_use_lvmetad; case ${enableval} in
|
||||
yes) DEFAULT_USE_LVMETAD=1 ;;
|
||||
*) DEFAULT_USE_LVMETAD=0 ;;
|
||||
esac
|
||||
else
|
||||
DEFAULT_USE_LVMETAD=1
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_LVMETAD" >&5
|
||||
$as_echo "$DEFAULT_USE_LVMETAD" >&6; }
|
||||
|
||||
$as_echo "#define LVMETAD_SUPPORT 1" >>confdefs.h
|
||||
|
||||
@ -10861,8 +10881,15 @@ cat >>confdefs.h <<_ACEOF
|
||||
#define LVMETAD_PIDFILE "$LVMETAD_PIDFILE"
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
DEFAULT_USE_LVMETAD=0
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define DEFAULT_USE_LVMETAD $DEFAULT_USE_LVMETAD
|
||||
_ACEOF
|
||||
|
||||
|
||||
################################################################################
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lvmpolld" >&5
|
||||
$as_echo_n "checking whether to build lvmpolld... " >&6; }
|
||||
@ -10877,6 +10904,20 @@ $as_echo "$LVMPOLLD" >&6; }
|
||||
BUILD_LVMPOLLD=$LVMPOLLD
|
||||
|
||||
if test "$BUILD_LVMPOLLD" = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmpolld" >&5
|
||||
$as_echo_n "checking defaults for use_lvmpolld... " >&6; }
|
||||
# Check whether --enable-use_lvmpolld was given.
|
||||
if test "${enable_use_lvmpolld+set}" = set; then :
|
||||
enableval=$enable_use_lvmpolld; case ${enableval} in
|
||||
yes) DEFAULT_USE_LVMPOLLD=1 ;;
|
||||
*) DEFAULT_USE_LVMPOLLD=0 ;;
|
||||
esac
|
||||
else
|
||||
DEFAULT_USE_LVMPOLLD=1
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_LVMPOLLD" >&5
|
||||
$as_echo "$DEFAULT_USE_LVMPOLLD" >&6; }
|
||||
|
||||
$as_echo "#define LVMPOLLD_SUPPORT 1" >>confdefs.h
|
||||
|
||||
@ -10894,8 +10935,15 @@ cat >>confdefs.h <<_ACEOF
|
||||
#define LVMPOLLD_PIDFILE "$LVMPOLLD_PIDFILE"
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
DEFAULT_USE_LVMPOLLD=0
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define DEFAULT_USE_LVMPOLLD $DEFAULT_USE_LVMPOLLD
|
||||
_ACEOF
|
||||
|
||||
|
||||
################################################################################
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libblkid detection of signatures when wiping" >&5
|
||||
$as_echo_n "checking whether to enable libblkid detection of signatures when wiping... " >&6; }
|
||||
@ -13187,6 +13235,8 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
28
configure.in
28
configure.in
@ -1067,6 +1067,15 @@ AC_MSG_RESULT($LVMETAD)
|
||||
BUILD_LVMETAD=$LVMETAD
|
||||
|
||||
if test "$BUILD_LVMETAD" = yes; then
|
||||
AC_MSG_CHECKING([defaults for use_lvmetad])
|
||||
AC_ARG_ENABLE(use_lvmetad,
|
||||
AC_HELP_STRING([--disable-use-lvmetad],
|
||||
[disable usage of LVM Metadata Daemon]),
|
||||
[case ${enableval} in
|
||||
yes) DEFAULT_USE_LVMETAD=1 ;;
|
||||
*) DEFAULT_USE_LVMETAD=0 ;;
|
||||
esac], DEFAULT_USE_LVMETAD=1)
|
||||
AC_MSG_RESULT($DEFAULT_USE_LVMETAD)
|
||||
AC_DEFINE([LVMETAD_SUPPORT], 1, [Define to 1 to include code that uses lvmetad.])
|
||||
|
||||
AC_ARG_WITH(lvmetad-pidfile,
|
||||
@ -1076,7 +1085,11 @@ if test "$BUILD_LVMETAD" = yes; then
|
||||
LVMETAD_PIDFILE="$DEFAULT_PID_DIR/lvmetad.pid")
|
||||
AC_DEFINE_UNQUOTED(LVMETAD_PIDFILE, ["$LVMETAD_PIDFILE"],
|
||||
[Path to lvmetad pidfile.])
|
||||
else
|
||||
DEFAULT_USE_LVMETAD=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMETAD, [$DEFAULT_USE_LVMETAD],
|
||||
[Use lvmetad by default.])
|
||||
|
||||
################################################################################
|
||||
dnl -- Build lvmpolld
|
||||
@ -1090,6 +1103,15 @@ AC_MSG_RESULT($LVMPOLLD)
|
||||
BUILD_LVMPOLLD=$LVMPOLLD
|
||||
|
||||
if test "$BUILD_LVMPOLLD" = yes; then
|
||||
AC_MSG_CHECKING([defaults for use_lvmpolld])
|
||||
AC_ARG_ENABLE(use_lvmpolld,
|
||||
AC_HELP_STRING([--disable-use-lvmpolld],
|
||||
[disable usage of LVM Poll Daemon]),
|
||||
[case ${enableval} in
|
||||
yes) DEFAULT_USE_LVMPOLLD=1 ;;
|
||||
*) DEFAULT_USE_LVMPOLLD=0 ;;
|
||||
esac], DEFAULT_USE_LVMPOLLD=1)
|
||||
AC_MSG_RESULT($DEFAULT_USE_LVMPOLLD)
|
||||
AC_DEFINE([LVMPOLLD_SUPPORT], 1, [Define to 1 to include code that uses lvmpolld.])
|
||||
|
||||
AC_ARG_WITH(lvmpolld-pidfile,
|
||||
@ -1099,7 +1121,11 @@ if test "$BUILD_LVMPOLLD" = yes; then
|
||||
LVMPOLLD_PIDFILE="$DEFAULT_PID_DIR/lvmpolld.pid")
|
||||
AC_DEFINE_UNQUOTED(LVMPOLLD_PIDFILE, ["$LVMPOLLD_PIDFILE"],
|
||||
[Path to lvmpolld pidfile.])
|
||||
else
|
||||
DEFAULT_USE_LVMPOLLD=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMPOLLD, [$DEFAULT_USE_LVMPOLLD],
|
||||
[Use lvmpolld by default.])
|
||||
|
||||
################################################################################
|
||||
dnl -- Enable blkid wiping functionality
|
||||
@ -1748,6 +1774,8 @@ AC_SUBST(DEFAULT_RAID10_SEGTYPE)
|
||||
AC_SUBST(DEFAULT_RUN_DIR)
|
||||
AC_SUBST(DEFAULT_SPARSE_SEGTYPE)
|
||||
AC_SUBST(DEFAULT_SYS_DIR)
|
||||
AC_SUBST(DEFAULT_USE_LVMETAD)
|
||||
AC_SUBST(DEFAULT_USE_LVMPOLLD)
|
||||
AC_SUBST(DEVMAPPER)
|
||||
AC_SUBST(DLM_CFLAGS)
|
||||
AC_SUBST(DLM_LIBS)
|
||||
|
@ -780,7 +780,7 @@ cfg(global_lvdisplay_shows_full_device_path_CFG, "lvdisplay_shows_full_device_pa
|
||||
"was never a valid path in the /dev filesystem.\n"
|
||||
"Enable this option to reinstate the previous format.\n")
|
||||
|
||||
cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 93), NULL, 0, NULL,
|
||||
cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_LVMETAD, vsn(2, 2, 93), NULL, 0, NULL,
|
||||
"Use lvmetad to cache metadata and reduce disk scanning.\n"
|
||||
"When enabled (and running), lvmetad provides LVM commands\n"
|
||||
"with VG metadata and PV state. LVM commands then avoid\n"
|
||||
@ -920,7 +920,7 @@ cfg(activation_checks_CFG, "checks", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, D
|
||||
"Some of the checks may be expensive, so it's best to use\n"
|
||||
"this only when there seems to be a problem.\n")
|
||||
|
||||
cfg(global_use_lvmpolld_CFG, "use_lvmpolld", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 120), NULL, 0, NULL,
|
||||
cfg(global_use_lvmpolld_CFG, "use_lvmpolld", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_LVMPOLLD, vsn(2, 2, 120), NULL, 0, NULL,
|
||||
"Indicates whether to use lvmpolld instead of classical polldaemon (a process\n"
|
||||
"forked off an initiating lvm command) or not. When set to 1 and native systemd\n"
|
||||
"service is installed in the system lvm starts using lvmpolld. lvmpolld gets\n"
|
||||
|
@ -95,6 +95,12 @@
|
||||
/* Path to LVM system directory. */
|
||||
#undef DEFAULT_SYS_DIR
|
||||
|
||||
/* Use lvmetad by default. */
|
||||
#undef DEFAULT_USE_LVMETAD
|
||||
|
||||
/* Use lvmpolld by default. */
|
||||
#undef DEFAULT_USE_LVMPOLLD
|
||||
|
||||
/* Define to 1 to enable LVM2 device-mapper interaction. */
|
||||
#undef DEVMAPPER_SUPPORT
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user