1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-06-22 11:16:54 +03:00

configure: add DEFAULT_USE_BLKID_WIPING

If blkid wiping is possible, than set use_blkid_wiping=1 and
use_blkid_wiping=0 otherwise for its default value. If blkid wiping
is disabled during configure and use_blkid_wiping=1 is set by chance,
it's simply ignored - this patch is just a cleanup that makes it more
obvious for the user (we use similar logic for use_lvmetad and
use_lvmpolld settings).
This commit is contained in:
Peter Rajnoha 2015-06-23 15:20:51 +02:00
parent 6575122c63
commit 20e336f21c
4 changed files with 23 additions and 3 deletions

12
configure vendored
View File

@ -695,6 +695,7 @@ DL_LIBS
DEVMAPPER
DEFAULT_USE_LVMPOLLD
DEFAULT_USE_LVMETAD
DEFAULT_USE_BLKID_WIPING
DEFAULT_SYS_DIR
DEFAULT_SPARSE_SEGTYPE
DEFAULT_RUN_DIR
@ -724,7 +725,6 @@ BUILD_LVMPOLLD
BUILD_LVMETAD
BUILD_DMEVENTD
BUILD_CMIRRORD
BLKID_WIPING
BLKID_PC
APPLIB
MODPROBE_CMD
@ -11052,12 +11052,22 @@ $as_echo "yes" >&6; }
fi
if test "$BLKID_WIPING" = yes; then
BLKID_PC="blkid"
DEFAULT_USE_BLKID_WIPING=1
$as_echo "#define BLKID_WIPING_SUPPORT 1" >>confdefs.h
else
DEFAULT_USE_BLKID_WIPING=1
fi
else
DEFAULT_USE_BLKID_WIPING=0
fi
cat >>confdefs.h <<_ACEOF
#define DEFAULT_USE_BLKID_WIPING $DEFAULT_USE_BLKID_WIPING
_ACEOF
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use udev-systemd protocol for jobs in background" >&5
$as_echo_n "checking whether to use udev-systemd protocol for jobs in background... " >&6; }

View File

@ -1152,9 +1152,16 @@ if test "$BLKID_WIPING" != no; then
fi])
if test "$BLKID_WIPING" = yes; then
BLKID_PC="blkid"
DEFAULT_USE_BLKID_WIPING=1
AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
else
DEFAULT_USE_BLKID_WIPING=1
fi
else
DEFAULT_USE_BLKID_WIPING=0
fi
AC_DEFINE_UNQUOTED(DEFAULT_USE_BLKID_WIPING, [$DEFAULT_USE_BLKID_WIPING],
[Use blkid wiping by default.])
################################################################################
dnl -- Enable udev-systemd protocol to instantiate a service for background jobs
@ -1742,7 +1749,6 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'`
AC_SUBST(APPLIB)
AC_SUBST(AWK)
AC_SUBST(BLKID_PC)
AC_SUBST(BLKID_WIPING)
AC_SUBST(BUILD_CMIRRORD)
AC_SUBST(BUILD_DMEVENTD)
AC_SUBST(BUILD_LVMETAD)
@ -1783,6 +1789,7 @@ AC_SUBST(DEFAULT_RAID10_SEGTYPE)
AC_SUBST(DEFAULT_RUN_DIR)
AC_SUBST(DEFAULT_SPARSE_SEGTYPE)
AC_SUBST(DEFAULT_SYS_DIR)
AC_SUBST(DEFAULT_USE_BLKID_WIPING)
AC_SUBST(DEFAULT_USE_LVMETAD)
AC_SUBST(DEFAULT_USE_LVMPOLLD)
AC_SUBST(DEVMAPPER)

View File

@ -423,7 +423,7 @@ cfg(allocation_maximise_cling_CFG, "maximise_cling", allocation_CFG_SECTION, 0,
"the same disks. This setting can be used to disable the changes\n"
"and revert to the previous algorithm.\n")
cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL, 0, NULL,
cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), "@DEFAULT_USE_BLKID_WIPING@", 0, NULL,
"Use blkid to detect existing signatures on new PVs and LVs.\n"
"The blkid library can detect more signatures than the\n"
"native LVM detection code, but may take longer.\n"

View File

@ -95,6 +95,9 @@
/* Path to LVM system directory. */
#undef DEFAULT_SYS_DIR
/* Use blkid wiping by default. */
#undef DEFAULT_USE_BLKID_WIPING
/* Use lvmetad by default. */
#undef DEFAULT_USE_LVMETAD