mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-12 13:18:31 +03:00
Merge branch 'master' into 2018-04-30-vdo-support
This commit is contained in:
commit
11d9b0cae7
@ -210,9 +210,7 @@ endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ("$(TESTING)", "yes")
|
||||
include test/unit/Makefile
|
||||
endif
|
||||
|
||||
include device-mapper/Makefile
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
Version 2.02.178 -
|
||||
=====================================
|
||||
--enable-testing switch for ./configure has been removed.
|
||||
--with-snapshots switch for ./configure has been removed.
|
||||
--with-mirrors switch for ./configure has been removed.
|
||||
--with-raid switch for ./configure has been removed.
|
||||
|
111
configure
vendored
111
configure
vendored
@ -653,7 +653,6 @@ UDEV_RULES
|
||||
UDEV_PC
|
||||
THIN
|
||||
TESTSUITE_DATA
|
||||
TESTING
|
||||
STATIC_LINK
|
||||
STATICDIR
|
||||
SNAPSHOTS
|
||||
@ -677,7 +676,6 @@ PYTHON_BINDINGS
|
||||
PYTHON3
|
||||
PTHREAD_LIBS
|
||||
M_LIBS
|
||||
POOL
|
||||
PKGCONFIG
|
||||
ODIRECT
|
||||
OCFDIR
|
||||
@ -692,8 +690,6 @@ LVM_MINOR
|
||||
LVM_MAJOR
|
||||
LVM_LIBAPI
|
||||
LVM_VERSION
|
||||
LVM1_FALLBACK
|
||||
LVM1
|
||||
LIB_SUFFIX
|
||||
LDDEPS
|
||||
JOBS
|
||||
@ -721,7 +717,6 @@ DEFAULT_RAID10_SEGTYPE
|
||||
DEFAULT_PROFILE_SUBDIR
|
||||
DEFAULT_PID_DIR
|
||||
DEFAULT_MIRROR_SEGTYPE
|
||||
DEFAULT_FALLBACK_TO_LVM1
|
||||
DEFAULT_LOCK_DIR
|
||||
DEFAULT_DM_RUN_DIR
|
||||
DEFAULT_DATA_ALIGNMENT
|
||||
@ -914,9 +909,6 @@ with_device_gid
|
||||
with_device_mode
|
||||
with_device_nodes_on
|
||||
with_default_name_mangling
|
||||
enable_lvm1_fallback
|
||||
with_lvm1
|
||||
with_pool
|
||||
with_cluster
|
||||
with_snapshots
|
||||
with_mirrors
|
||||
@ -950,7 +942,6 @@ with_cmirrord_pidfile
|
||||
enable_debug
|
||||
with_optimisation
|
||||
enable_profiling
|
||||
enable_testing
|
||||
enable_valgrind_pool
|
||||
enable_devmapper
|
||||
enable_lvmetad
|
||||
@ -1684,8 +1675,6 @@ Optional Features:
|
||||
speeds up one-time build.
|
||||
--enable-static_link use this to link the tools to their libraries
|
||||
statically (default is dynamic linking
|
||||
--enable-lvm1_fallback use this to fall back and use LVM1 binaries if
|
||||
device-mapper is missing from the kernel
|
||||
--disable-thin_check_needs_check
|
||||
required if thin_check version is < 0.3.0
|
||||
--disable-cache_check_needs_check
|
||||
@ -1697,7 +1686,6 @@ Optional Features:
|
||||
--enable-cmirrord enable the cluster mirror log daemon
|
||||
--enable-debug enable debugging
|
||||
--enable-profiling gather gcov profiling data
|
||||
--enable-testing enable testing targets in the makefile
|
||||
--enable-valgrind-pool enable valgrind awareness of pools
|
||||
--disable-devmapper disable LVM2 device-mapper interaction
|
||||
--enable-lvmetad enable the LVM Metadata Daemon
|
||||
@ -1753,10 +1741,6 @@ Optional Packages:
|
||||
create nodes on resume or create [ON=resume]
|
||||
--with-default-name-mangling=MANGLING
|
||||
default name mangling: auto/none/hex [auto]
|
||||
--with-lvm1=TYPE LVM1 metadata support: internal/shared/none
|
||||
[internal]
|
||||
--with-pool=TYPE GFS pool read-only support: internal/shared/none
|
||||
[internal]
|
||||
--with-cluster=TYPE cluster LVM locking support: internal/shared/none
|
||||
[internal]
|
||||
--with-snapshots=TYPE snapshot support: internal/shared/none [internal]
|
||||
@ -8390,78 +8374,6 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
################################################################################
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable lvm1 fallback" >&5
|
||||
$as_echo_n "checking whether to enable lvm1 fallback... " >&6; }
|
||||
# Check whether --enable-lvm1_fallback was given.
|
||||
if test "${enable_lvm1_fallback+set}" = set; then :
|
||||
enableval=$enable_lvm1_fallback; LVM1_FALLBACK=$enableval
|
||||
else
|
||||
LVM1_FALLBACK=no
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LVM1_FALLBACK" >&5
|
||||
$as_echo "$LVM1_FALLBACK" >&6; }
|
||||
|
||||
if test "$LVM1_FALLBACK" = yes; then
|
||||
DEFAULT_FALLBACK_TO_LVM1=1
|
||||
|
||||
$as_echo "#define LVM1_FALLBACK 1" >>confdefs.h
|
||||
|
||||
else
|
||||
DEFAULT_FALLBACK_TO_LVM1=0
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define DEFAULT_FALLBACK_TO_LVM1 $DEFAULT_FALLBACK_TO_LVM1
|
||||
_ACEOF
|
||||
|
||||
|
||||
################################################################################
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include support for lvm1 metadata" >&5
|
||||
$as_echo_n "checking whether to include support for lvm1 metadata... " >&6; }
|
||||
|
||||
# Check whether --with-lvm1 was given.
|
||||
if test "${with_lvm1+set}" = set; then :
|
||||
withval=$with_lvm1; LVM1=$withval
|
||||
else
|
||||
LVM1=internal
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LVM1" >&5
|
||||
$as_echo "$LVM1" >&6; }
|
||||
|
||||
case "$LVM1" in
|
||||
none|shared) ;;
|
||||
internal)
|
||||
$as_echo "#define LVM1_INTERNAL 1" >>confdefs.h
|
||||
;;
|
||||
*) as_fn_error $? "--with-lvm1 parameter invalid" "$LINENO" 5 ;;
|
||||
esac
|
||||
|
||||
################################################################################
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include support for GFS pool metadata" >&5
|
||||
$as_echo_n "checking whether to include support for GFS pool metadata... " >&6; }
|
||||
|
||||
# Check whether --with-pool was given.
|
||||
if test "${with_pool+set}" = set; then :
|
||||
withval=$with_pool; POOL=$withval
|
||||
else
|
||||
POOL=internal
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $POOL" >&5
|
||||
$as_echo "$POOL" >&6; }
|
||||
|
||||
case "$POOL" in
|
||||
none|shared) ;;
|
||||
internal)
|
||||
$as_echo "#define POOL_INTERNAL 1" >>confdefs.h
|
||||
;;
|
||||
*) as_fn_error $? "--with-pool parameter invalid" "$LINENO" 5
|
||||
esac
|
||||
|
||||
################################################################################
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include support for cluster locking" >&5
|
||||
$as_echo_n "checking whether to include support for cluster locking... " >&6; }
|
||||
@ -11597,19 +11509,6 @@ $as_echo "$as_me: WARNING: GD.pm perl module is not installed" >&2;}
|
||||
fi
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable unit testing" >&5
|
||||
$as_echo_n "checking whether to enable unit testing... " >&6; }
|
||||
# Check whether --enable-testing was given.
|
||||
if test "${enable_testing+set}" = set; then :
|
||||
enableval=$enable_testing; TESTING=$enableval
|
||||
else
|
||||
TESTING=no
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TESTING" >&5
|
||||
$as_echo "$TESTING" >&6; }
|
||||
|
||||
################################################################################
|
||||
TESTSUITE_DATA='${datarootdir}/lvm2-testsuite'
|
||||
# double eval needed ${datarootdir} -> ${prefix}/share -> real path
|
||||
@ -15677,11 +15576,6 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -15689,7 +15583,7 @@ _ACEOF
|
||||
|
||||
|
||||
################################################################################
|
||||
ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/dmfilemapd/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py daemons/lvmdbusd/lvm_shell_proxy.py daemons/lvmdbusd/path.py daemons/lvmetad/Makefile daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile include/lvm-version.h libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_lvmlocking_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile"
|
||||
ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/dmfilemapd/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py daemons/lvmdbusd/lvm_shell_proxy.py daemons/lvmdbusd/path.py daemons/lvmetad/Makefile daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/.symlinks include/Makefile lib/Makefile lib/locking/Makefile include/lvm-version.h libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_lvmlocking_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@ -16411,10 +16305,9 @@ do
|
||||
"conf/lvmlocal.conf") CONFIG_FILES="$CONFIG_FILES conf/lvmlocal.conf" ;;
|
||||
"conf/command_profile_template.profile") CONFIG_FILES="$CONFIG_FILES conf/command_profile_template.profile" ;;
|
||||
"conf/metadata_profile_template.profile") CONFIG_FILES="$CONFIG_FILES conf/metadata_profile_template.profile" ;;
|
||||
"include/.symlinks") CONFIG_FILES="$CONFIG_FILES include/.symlinks" ;;
|
||||
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
|
||||
"lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
|
||||
"lib/format1/Makefile") CONFIG_FILES="$CONFIG_FILES lib/format1/Makefile" ;;
|
||||
"lib/format_pool/Makefile") CONFIG_FILES="$CONFIG_FILES lib/format_pool/Makefile" ;;
|
||||
"lib/locking/Makefile") CONFIG_FILES="$CONFIG_FILES lib/locking/Makefile" ;;
|
||||
"include/lvm-version.h") CONFIG_FILES="$CONFIG_FILES include/lvm-version.h" ;;
|
||||
"libdaemon/Makefile") CONFIG_FILES="$CONFIG_FILES libdaemon/Makefile" ;;
|
||||
|
69
configure.ac
69
configure.ac
@ -282,58 +282,6 @@ esac
|
||||
AC_MSG_RESULT($MANGLING)
|
||||
AC_DEFINE_UNQUOTED([DEFAULT_DM_NAME_MANGLING], $mangling, [Define default name mangling behaviour])
|
||||
|
||||
################################################################################
|
||||
dnl -- LVM1 tool fallback option
|
||||
AC_MSG_CHECKING(whether to enable lvm1 fallback)
|
||||
AC_ARG_ENABLE(lvm1_fallback,
|
||||
AC_HELP_STRING([--enable-lvm1_fallback],
|
||||
[use this to fall back and use LVM1 binaries if
|
||||
device-mapper is missing from the kernel]),
|
||||
LVM1_FALLBACK=$enableval, LVM1_FALLBACK=no)
|
||||
AC_MSG_RESULT($LVM1_FALLBACK)
|
||||
|
||||
if test "$LVM1_FALLBACK" = yes; then
|
||||
DEFAULT_FALLBACK_TO_LVM1=1
|
||||
AC_DEFINE([LVM1_FALLBACK], 1, [Define to 1 if 'lvm' should fall back to using LVM1 binaries if device-mapper is missing from the kernel])
|
||||
else
|
||||
DEFAULT_FALLBACK_TO_LVM1=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_FALLBACK_TO_LVM1, [$DEFAULT_FALLBACK_TO_LVM1],
|
||||
[Fall back to LVM1 by default if device-mapper is missing from the kernel.])
|
||||
|
||||
################################################################################
|
||||
dnl -- format1 inclusion type
|
||||
AC_MSG_CHECKING(whether to include support for lvm1 metadata)
|
||||
AC_ARG_WITH(lvm1,
|
||||
AC_HELP_STRING([--with-lvm1=TYPE],
|
||||
[LVM1 metadata support: internal/shared/none [internal]]),
|
||||
LVM1=$withval, LVM1=internal)
|
||||
|
||||
AC_MSG_RESULT($LVM1)
|
||||
|
||||
case "$LVM1" in
|
||||
none|shared) ;;
|
||||
internal) AC_DEFINE([LVM1_INTERNAL], 1,
|
||||
[Define to 1 to include built-in support for LVM1 metadata.]) ;;
|
||||
*) AC_MSG_ERROR([--with-lvm1 parameter invalid]) ;;
|
||||
esac
|
||||
|
||||
################################################################################
|
||||
dnl -- format_pool inclusion type
|
||||
AC_MSG_CHECKING(whether to include support for GFS pool metadata)
|
||||
AC_ARG_WITH(pool,
|
||||
AC_HELP_STRING([--with-pool=TYPE],
|
||||
[GFS pool read-only support: internal/shared/none [internal]]),
|
||||
POOL=$withval, POOL=internal)
|
||||
AC_MSG_RESULT($POOL)
|
||||
|
||||
case "$POOL" in
|
||||
none|shared) ;;
|
||||
internal) AC_DEFINE([POOL_INTERNAL], 1,
|
||||
[Define to 1 to include built-in support for GFS pool metadata.]) ;;
|
||||
*) AC_MSG_ERROR([--with-pool parameter invalid])
|
||||
esac
|
||||
|
||||
################################################################################
|
||||
dnl -- cluster_locking inclusion type
|
||||
AC_MSG_CHECKING(whether to include support for cluster locking)
|
||||
@ -1067,15 +1015,6 @@ if test "$PROFILING" = yes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
dnl -- Enable testing
|
||||
AC_MSG_CHECKING(whether to enable unit testing)
|
||||
AC_ARG_ENABLE(testing,
|
||||
AC_HELP_STRING([--enable-testing],
|
||||
[enable testing targets in the makefile]),
|
||||
TESTING=$enableval, TESTING=no)
|
||||
AC_MSG_RESULT($TESTING)
|
||||
|
||||
################################################################################
|
||||
dnl -- Set LVM2 testsuite data
|
||||
TESTSUITE_DATA='${datarootdir}/lvm2-testsuite'
|
||||
@ -2042,7 +1981,6 @@ AC_SUBST(DEFAULT_CACHE_SUBDIR)
|
||||
AC_SUBST(DEFAULT_DATA_ALIGNMENT)
|
||||
AC_SUBST(DEFAULT_DM_RUN_DIR)
|
||||
AC_SUBST(DEFAULT_LOCK_DIR)
|
||||
AC_SUBST(DEFAULT_FALLBACK_TO_LVM1)
|
||||
AC_SUBST(DEFAULT_MIRROR_SEGTYPE)
|
||||
AC_SUBST(DEFAULT_PID_DIR)
|
||||
AC_SUBST(DEFAULT_PROFILE_SUBDIR)
|
||||
@ -2073,8 +2011,6 @@ AC_SUBST(JOBS)
|
||||
AC_SUBST(LDDEPS)
|
||||
AC_SUBST(LIBS)
|
||||
AC_SUBST(LIB_SUFFIX)
|
||||
AC_SUBST(LVM1)
|
||||
AC_SUBST(LVM1_FALLBACK)
|
||||
AC_SUBST(LVM_VERSION)
|
||||
AC_SUBST(LVM_LIBAPI)
|
||||
AC_SUBST(LVM_MAJOR)
|
||||
@ -2091,7 +2027,6 @@ AC_SUBST(OCF)
|
||||
AC_SUBST(OCFDIR)
|
||||
AC_SUBST(ODIRECT)
|
||||
AC_SUBST(PKGCONFIG)
|
||||
AC_SUBST(POOL)
|
||||
AC_SUBST(M_LIBS)
|
||||
AC_SUBST(PTHREAD_LIBS)
|
||||
AC_SUBST(PYTHON2)
|
||||
@ -2123,7 +2058,6 @@ AC_SUBST(SYSTEMD_LIBS)
|
||||
AC_SUBST(SNAPSHOTS)
|
||||
AC_SUBST(STATICDIR)
|
||||
AC_SUBST(STATIC_LINK)
|
||||
AC_SUBST(TESTING)
|
||||
AC_SUBST(TESTSUITE_DATA)
|
||||
AC_SUBST(THIN)
|
||||
AC_SUBST(THIN_CHECK_CMD)
|
||||
@ -2194,10 +2128,9 @@ conf/example.conf
|
||||
conf/lvmlocal.conf
|
||||
conf/command_profile_template.profile
|
||||
conf/metadata_profile_template.profile
|
||||
include/.symlinks
|
||||
include/Makefile
|
||||
lib/Makefile
|
||||
lib/format1/Makefile
|
||||
lib/format_pool/Makefile
|
||||
lib/locking/Makefile
|
||||
include/lvm-version.h
|
||||
libdaemon/Makefile
|
||||
|
@ -108,7 +108,6 @@ int do_command(struct local_client *client, struct clvm_header *msg, int msglen,
|
||||
lock_flags = args[1];
|
||||
lockname = &args[2];
|
||||
/* Check to see if the VG is in use by LVM1 */
|
||||
status = do_check_lvm1(lockname);
|
||||
do_lock_vg(lock_cmd, lock_flags, lockname);
|
||||
break;
|
||||
|
||||
|
@ -639,16 +639,6 @@ int post_lock_lv(unsigned char command, unsigned char lock_flags,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Check if a VG is in use by LVM1 so we don't stomp on it */
|
||||
int do_check_lvm1(const char *vgname)
|
||||
{
|
||||
int status;
|
||||
|
||||
status = check_lvm1_vg_inactive(cmd, vgname);
|
||||
|
||||
return status == 1 ? 0 : EBUSY;
|
||||
}
|
||||
|
||||
int do_refresh_cache(void)
|
||||
{
|
||||
DEBUGLOG("Refreshing context\n");
|
||||
|
@ -25,7 +25,6 @@ extern int do_lock_lv(unsigned char lock_cmd, unsigned char lock_flags,
|
||||
extern const char *do_lock_query(char *resource);
|
||||
extern int post_lock_lv(unsigned char lock_cmd, unsigned char lock_flags,
|
||||
char *resource);
|
||||
extern int do_check_lvm1(const char *vgname);
|
||||
extern int do_refresh_cache(void);
|
||||
extern int init_clvm(struct dm_hash_table *excl_uuid);
|
||||
extern void destroy_lvm(void);
|
||||
|
@ -16,7 +16,7 @@ srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = @top_builddir@
|
||||
|
||||
SUBDIRS += lvm2 snapshot raid thin mirrors
|
||||
SUBDIRS += lvm2 snapshot raid thin mirror
|
||||
|
||||
ifeq ($(MAKECMDGOALS),distclean)
|
||||
SUBDIRS = lvm2 mirror snapshot raid thin
|
||||
|
@ -22,7 +22,6 @@
|
||||
#define LVMETAD_TOKEN_UPDATE_IN_PROGRESS "update in progress"
|
||||
|
||||
#define LVMETAD_DISABLE_REASON_DIRECT "DIRECT"
|
||||
#define LVMETAD_DISABLE_REASON_LVM1 "LVM1"
|
||||
#define LVMETAD_DISABLE_REASON_DUPLICATES "DUPLICATES"
|
||||
#define LVMETAD_DISABLE_REASON_VGRESTORE "VGRESTORE"
|
||||
#define LVMETAD_DISABLE_REASON_REPAIR "REPAIR"
|
||||
|
@ -200,12 +200,12 @@ struct vg_info {
|
||||
#define GLFL_INVALID 0x00000001
|
||||
#define GLFL_DISABLE 0x00000002
|
||||
#define GLFL_DISABLE_REASON_DIRECT 0x00000004
|
||||
#define GLFL_DISABLE_REASON_LVM1 0x00000008
|
||||
/* 0x00000008 */
|
||||
#define GLFL_DISABLE_REASON_DUPLICATES 0x00000010
|
||||
#define GLFL_DISABLE_REASON_VGRESTORE 0x00000020
|
||||
#define GLFL_DISABLE_REASON_REPAIR 0x00000040
|
||||
|
||||
#define GLFL_DISABLE_REASON_ALL (GLFL_DISABLE_REASON_DIRECT | GLFL_DISABLE_REASON_REPAIR | GLFL_DISABLE_REASON_LVM1 | GLFL_DISABLE_REASON_DUPLICATES | GLFL_DISABLE_REASON_VGRESTORE)
|
||||
#define GLFL_DISABLE_REASON_ALL (GLFL_DISABLE_REASON_DIRECT | GLFL_DISABLE_REASON_REPAIR | GLFL_DISABLE_REASON_DUPLICATES | GLFL_DISABLE_REASON_VGRESTORE)
|
||||
|
||||
#define VGFL_INVALID 0x00000001
|
||||
|
||||
@ -2369,8 +2369,6 @@ static response set_global_info(lvmetad_state *s, request r)
|
||||
reason_flags |= GLFL_DISABLE_REASON_DIRECT;
|
||||
if (strstr(reason, LVMETAD_DISABLE_REASON_REPAIR))
|
||||
reason_flags |= GLFL_DISABLE_REASON_REPAIR;
|
||||
if (strstr(reason, LVMETAD_DISABLE_REASON_LVM1))
|
||||
reason_flags |= GLFL_DISABLE_REASON_LVM1;
|
||||
if (strstr(reason, LVMETAD_DISABLE_REASON_DUPLICATES))
|
||||
reason_flags |= GLFL_DISABLE_REASON_DUPLICATES;
|
||||
if (strstr(reason, LVMETAD_DISABLE_REASON_VGRESTORE))
|
||||
@ -2429,10 +2427,9 @@ static response get_global_info(lvmetad_state *s, request r)
|
||||
pid = (int)daemon_request_int(r, "pid", 0);
|
||||
|
||||
if (s->flags & GLFL_DISABLE) {
|
||||
snprintf(reason, REASON_BUF_SIZE, "%s%s%s%s%s",
|
||||
snprintf(reason, REASON_BUF_SIZE, "%s%s%s%s",
|
||||
(s->flags & GLFL_DISABLE_REASON_DIRECT) ? LVMETAD_DISABLE_REASON_DIRECT "," : "",
|
||||
(s->flags & GLFL_DISABLE_REASON_REPAIR) ? LVMETAD_DISABLE_REASON_REPAIR "," : "",
|
||||
(s->flags & GLFL_DISABLE_REASON_LVM1) ? LVMETAD_DISABLE_REASON_LVM1 "," : "",
|
||||
(s->flags & GLFL_DISABLE_REASON_DUPLICATES) ? LVMETAD_DISABLE_REASON_DUPLICATES "," : "",
|
||||
(s->flags & GLFL_DISABLE_REASON_VGRESTORE) ? LVMETAD_DISABLE_REASON_VGRESTORE "," : "");
|
||||
}
|
||||
|
6
include/.gitignore
vendored
6
include/.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
configure.h
|
||||
lvm-version.h
|
||||
.symlinks
|
||||
.symlinks_created
|
||||
|
||||
*.h
|
||||
|
80
include/.symlinks.in
Normal file
80
include/.symlinks.in
Normal file
@ -0,0 +1,80 @@
|
||||
@top_srcdir@/daemons/clvmd/clvm.h
|
||||
@top_srcdir@/daemons/dmeventd/libdevmapper-event.h
|
||||
@top_srcdir@/daemons/lvmetad/lvmetad-client.h
|
||||
@top_srcdir@/daemons/lvmlockd/lvmlockd-client.h
|
||||
@top_srcdir@/daemons/lvmpolld/lvmpolld-protocol.h
|
||||
@top_srcdir@/daemons/lvmpolld/polling_ops.h
|
||||
@top_srcdir@/lib/activate/activate.h
|
||||
@top_srcdir@/lib/activate/targets.h
|
||||
@top_srcdir@/lib/cache/lvmcache.h
|
||||
@top_srcdir@/lib/cache/lvmetad.h
|
||||
@top_srcdir@/lib/commands/toolcontext.h
|
||||
@top_srcdir@/lib/config/config.h
|
||||
@top_srcdir@/lib/config/config_settings.h
|
||||
@top_srcdir@/lib/config/defaults.h
|
||||
@top_srcdir@/lib/datastruct/btree.h
|
||||
@top_srcdir@/lib/datastruct/str_list.h
|
||||
@top_srcdir@/lib/device/bcache.h
|
||||
@top_srcdir@/lib/device/dev-cache.h
|
||||
@top_srcdir@/lib/device/dev-ext-udev-constants.h
|
||||
@top_srcdir@/lib/device/dev-type.h
|
||||
@top_srcdir@/lib/device/device-types.h
|
||||
@top_srcdir@/lib/device/device.h
|
||||
@top_srcdir@/lib/display/display.h
|
||||
@top_srcdir@/lib/filters/filter.h
|
||||
@top_srcdir@/lib/format1/format1.h
|
||||
@top_srcdir@/lib/format_pool/format_pool.h
|
||||
@top_srcdir@/lib/format_text/archiver.h
|
||||
@top_srcdir@/lib/format_text/format-text.h
|
||||
@top_srcdir@/lib/format_text/text_export.h
|
||||
@top_srcdir@/lib/format_text/text_import.h
|
||||
@top_srcdir@/lib/label/label.h
|
||||
@top_srcdir@/lib/locking/locking.h
|
||||
@top_srcdir@/lib/locking/lvmlockd.h
|
||||
@top_srcdir@/lib/log/log.h
|
||||
@top_srcdir@/lib/log/lvm-logging.h
|
||||
@top_srcdir@/lib/lvmpolld/lvmpolld-client.h
|
||||
@top_srcdir@/lib/lvmpolld/polldaemon.h
|
||||
@top_srcdir@/lib/metadata/lv.h
|
||||
@top_srcdir@/lib/metadata/lv_alloc.h
|
||||
@top_srcdir@/lib/metadata/metadata-exported.h
|
||||
@top_srcdir@/lib/metadata/metadata.h
|
||||
@top_srcdir@/lib/metadata/pv.h
|
||||
@top_srcdir@/lib/metadata/pv_alloc.h
|
||||
@top_srcdir@/lib/metadata/segtype.h
|
||||
@top_srcdir@/lib/metadata/vg.h
|
||||
@top_srcdir@/lib/misc/crc.h
|
||||
@top_srcdir@/lib/misc/intl.h
|
||||
@top_srcdir@/lib/misc/last-path-component.h
|
||||
@top_srcdir@/lib/misc/lib.h
|
||||
@top_srcdir@/lib/misc/lvm-exec.h
|
||||
@top_srcdir@/lib/misc/lvm-file.h
|
||||
@top_srcdir@/lib/misc/lvm-flock.h
|
||||
@top_srcdir@/lib/misc/lvm-globals.h
|
||||
@top_srcdir@/lib/misc/lvm-maths.h
|
||||
@top_srcdir@/lib/misc/lvm-percent.h
|
||||
@top_srcdir@/lib/misc/lvm-signal.h
|
||||
@top_srcdir@/lib/misc/lvm-string.h
|
||||
@top_srcdir@/lib/misc/lvm-wrappers.h
|
||||
@top_srcdir@/lib/misc/sharedlib.h
|
||||
@top_srcdir@/lib/misc/util.h
|
||||
@top_srcdir@/lib/mm/memlock.h
|
||||
@top_srcdir@/lib/mm/xlate.h
|
||||
@top_srcdir@/lib/notify/lvmnotify.h
|
||||
@top_srcdir@/lib/properties/prop_common.h
|
||||
@top_srcdir@/lib/report/properties.h
|
||||
@top_srcdir@/lib/report/report.h
|
||||
@top_srcdir@/lib/uuid/uuid.h
|
||||
@top_srcdir@/libdaemon/client/config-util.h
|
||||
@top_srcdir@/libdaemon/client/daemon-client.h
|
||||
@top_srcdir@/libdaemon/client/daemon-io.h
|
||||
@top_srcdir@/libdm/libdevmapper.h
|
||||
@top_srcdir@/libdm/misc/dm-ioctl.h
|
||||
@top_srcdir@/libdm/misc/dm-log-userspace.h
|
||||
@top_srcdir@/libdm/misc/dm-logging.h
|
||||
@top_srcdir@/libdm/misc/dmlib.h
|
||||
@top_srcdir@/libdm/misc/kdev_t.h
|
||||
@top_srcdir@/liblvm/lvm2app.h
|
||||
@top_srcdir@/po/pogen.h
|
||||
@top_srcdir@/tools/lvm2cmd.h
|
||||
@top_srcdir@/tools/tool.h
|
@ -18,4 +18,22 @@ top_builddir = @top_builddir@
|
||||
|
||||
include $(top_builddir)/make.tmpl
|
||||
|
||||
DISTCLEAN_TARGETS += configure.h lvm-version.h
|
||||
all: .symlinks_created
|
||||
|
||||
LINKS := $(shell find . -maxdepth 1 -type l)
|
||||
|
||||
.symlinks_created: .symlinks
|
||||
ifneq (,$(firstword $(LINKS)))
|
||||
$(RM) $(LINKS)
|
||||
endif
|
||||
for i in `cat $<`; do $(LN_S) $$i ; done
|
||||
touch $@
|
||||
|
||||
pofile: all
|
||||
|
||||
device-mapper: all
|
||||
|
||||
cflow: all
|
||||
|
||||
DISTCLEAN_TARGETS += .symlinks configure.h lvm-version.h
|
||||
CLEAN_TARGETS += $(LINKS) .include_symlinks .symlinks_created
|
||||
|
@ -1 +0,0 @@
|
||||
../lib/activate/activate.h
|
@ -1 +0,0 @@
|
||||
../lib/format_text/archiver.h
|
@ -1 +0,0 @@
|
||||
../lib/device/bcache.h
|
@ -1 +0,0 @@
|
||||
../lib/datastruct/btree.h
|
@ -1 +0,0 @@
|
||||
../daemons/clvmd/clvm.h
|
@ -1 +0,0 @@
|
||||
../libdaemon/client/config-util.h
|
@ -1 +0,0 @@
|
||||
../lib/config/config.h
|
@ -1 +0,0 @@
|
||||
../lib/config/config_settings.h
|
@ -72,10 +72,6 @@
|
||||
/* Default system configuration directory. */
|
||||
#undef DEFAULT_ETC_DIR
|
||||
|
||||
/* Fall back to LVM1 by default if device-mapper is missing from the kernel.
|
||||
*/
|
||||
#undef DEFAULT_FALLBACK_TO_LVM1
|
||||
|
||||
/* Name of default locking directory. */
|
||||
#undef DEFAULT_LOCK_DIR
|
||||
|
||||
@ -617,13 +613,6 @@
|
||||
slash. */
|
||||
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
|
||||
|
||||
/* Define to 1 if 'lvm' should fall back to using LVM1 binaries if
|
||||
device-mapper is missing from the kernel */
|
||||
#undef LVM1_FALLBACK
|
||||
|
||||
/* Define to 1 to include built-in support for LVM1 metadata. */
|
||||
#undef LVM1_INTERNAL
|
||||
|
||||
/* Path to lvmetad pidfile. */
|
||||
#undef LVMETAD_PIDFILE
|
||||
|
||||
@ -686,9 +675,6 @@
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 to include built-in support for GFS pool metadata. */
|
||||
#undef POOL_INTERNAL
|
||||
|
||||
/* Define to 1 to include built-in support for raid. */
|
||||
#undef RAID_INTERNAL
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
../lib/misc/crc.h
|
@ -1 +0,0 @@
|
||||
../libdaemon/client/daemon-client.h
|
@ -1 +0,0 @@
|
||||
../libdaemon/client/daemon-io.h
|
@ -1 +0,0 @@
|
||||
../lib/config/defaults.h
|
@ -1 +0,0 @@
|
||||
../lib/device/dev-cache.h
|
@ -1 +0,0 @@
|
||||
../lib/device/dev-ext-udev-constants.h
|
@ -1 +0,0 @@
|
||||
../lib/device/dev-type.h
|
@ -1 +0,0 @@
|
||||
../lib/device/device-types.h
|
@ -1 +0,0 @@
|
||||
../lib/device/device.h
|
@ -1 +0,0 @@
|
||||
../lib/display/display.h
|
@ -1 +0,0 @@
|
||||
../libdm/misc/dm-ioctl.h
|
@ -1 +0,0 @@
|
||||
../libdm/misc/dm-log-userspace.h
|
@ -1 +0,0 @@
|
||||
../libdm/misc/dm-logging.h
|
@ -1 +0,0 @@
|
||||
../libdm/misc/dmlib.h
|
@ -1 +0,0 @@
|
||||
../lib/filters/filter.h
|
@ -1 +0,0 @@
|
||||
../lib/format_text/format-text.h
|
@ -1 +0,0 @@
|
||||
../lib/format1/format1.h
|
@ -1 +0,0 @@
|
||||
../lib/format_pool/format_pool.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/intl.h
|
@ -1 +0,0 @@
|
||||
../libdm/misc/kdev_t.h
|
@ -1 +0,0 @@
|
||||
../lib/label/label.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/last-path-component.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/lib.h
|
@ -1 +0,0 @@
|
||||
../daemons/dmeventd/libdevmapper-event.h
|
@ -1 +0,0 @@
|
||||
../libdm/libdevmapper.h
|
@ -1 +0,0 @@
|
||||
../lib/locking/locking.h
|
@ -1 +0,0 @@
|
||||
../lib/log/log.h
|
@ -1 +0,0 @@
|
||||
../lib/metadata/lv.h
|
@ -1 +0,0 @@
|
||||
../lib/metadata/lv_alloc.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/lvm-exec.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/lvm-file.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/lvm-flock.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/lvm-globals.h
|
@ -1 +0,0 @@
|
||||
../lib/log/lvm-logging.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/lvm-maths.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/lvm-percent.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/lvm-signal.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/lvm-string.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/lvm-wrappers.h
|
@ -1 +0,0 @@
|
||||
../liblvm/lvm2app.h
|
@ -1 +0,0 @@
|
||||
../tools/lvm2cmd.h
|
@ -1 +0,0 @@
|
||||
../lib/cache/lvmcache.h
|
@ -1 +0,0 @@
|
||||
../daemons/lvmetad/lvmetad-client.h
|
@ -1 +0,0 @@
|
||||
../lib/cache/lvmetad.h
|
@ -1 +0,0 @@
|
||||
../daemons/lvmlockd/lvmlockd-client.h
|
@ -1 +0,0 @@
|
||||
../lib/locking/lvmlockd.h
|
@ -1 +0,0 @@
|
||||
../lib/notify/lvmnotify.h
|
@ -1 +0,0 @@
|
||||
../lib/lvmpolld/lvmpolld-client.h
|
@ -1 +0,0 @@
|
||||
../daemons/lvmpolld/lvmpolld-protocol.h
|
@ -1 +0,0 @@
|
||||
../lib/mm/memlock.h
|
@ -1 +0,0 @@
|
||||
../lib/metadata/metadata-exported.h
|
@ -1 +0,0 @@
|
||||
../lib/metadata/metadata.h
|
@ -1 +0,0 @@
|
||||
../po/pogen.h
|
@ -1 +0,0 @@
|
||||
../lib/lvmpolld/polldaemon.h
|
@ -1 +0,0 @@
|
||||
../daemons/lvmpolld/polling_ops.h
|
@ -1 +0,0 @@
|
||||
../lib/properties/prop_common.h
|
@ -1 +0,0 @@
|
||||
../lib/report/properties.h
|
@ -1 +0,0 @@
|
||||
../lib/metadata/pv.h
|
@ -1 +0,0 @@
|
||||
../lib/metadata/pv_alloc.h
|
@ -1 +0,0 @@
|
||||
../lib/report/report.h
|
@ -1 +0,0 @@
|
||||
../lib/metadata/segtype.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/sharedlib.h
|
@ -1 +0,0 @@
|
||||
../lib/datastruct/str_list.h
|
@ -1 +0,0 @@
|
||||
../lib/activate/targets.h
|
@ -1 +0,0 @@
|
||||
../lib/format_text/text_export.h
|
@ -1 +0,0 @@
|
||||
../lib/format_text/text_import.h
|
@ -1 +0,0 @@
|
||||
../tools/tool.h
|
@ -1 +0,0 @@
|
||||
../lib/commands/toolcontext.h
|
@ -1 +0,0 @@
|
||||
../lib/misc/util.h
|
@ -1 +0,0 @@
|
||||
../lib/uuid/uuid.h
|
@ -1 +0,0 @@
|
||||
../lib/metadata/vg.h
|
@ -1 +0,0 @@
|
||||
../lib/mm/xlate.h
|
@ -16,14 +16,6 @@ srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = @top_builddir@
|
||||
|
||||
ifeq ("@LVM1@", "shared")
|
||||
SUBDIRS = format1
|
||||
endif
|
||||
|
||||
ifeq ("@POOL@", "shared")
|
||||
SUBDIRS += format_pool
|
||||
endif
|
||||
|
||||
ifeq ("@CLUSTER@", "shared")
|
||||
SUBDIRS += locking
|
||||
endif
|
||||
@ -45,6 +37,7 @@ SOURCES =\
|
||||
device/dev-type.c \
|
||||
device/dev-luks.c \
|
||||
device/dev-dasd.c \
|
||||
device/dev-lvm1-pool.c \
|
||||
display/display.c \
|
||||
error/errseg.c \
|
||||
unknown/unknown.c \
|
||||
@ -59,6 +52,7 @@ SOURCES =\
|
||||
filters/filter-type.c \
|
||||
filters/filter-usable.c \
|
||||
filters/filter-internal.c \
|
||||
filters/filter-signature.c \
|
||||
format_text/archive.c \
|
||||
format_text/archiver.c \
|
||||
format_text/export.c \
|
||||
@ -112,25 +106,6 @@ SOURCES =\
|
||||
uuid/uuid.c \
|
||||
zero/zero.c
|
||||
|
||||
ifeq ("@LVM1@", "internal")
|
||||
SOURCES +=\
|
||||
format1/disk-rep.c \
|
||||
format1/format1.c \
|
||||
format1/import-export.c \
|
||||
format1/import-extents.c \
|
||||
format1/layout.c \
|
||||
format1/lvm1-label.c \
|
||||
format1/vg_number.c
|
||||
endif
|
||||
|
||||
ifeq ("@POOL@", "internal")
|
||||
SOURCES +=\
|
||||
format_pool/disk_rep.c \
|
||||
format_pool/format_pool.c \
|
||||
format_pool/import_export.c \
|
||||
format_pool/pool_label.c
|
||||
endif
|
||||
|
||||
ifeq ("@CLUSTER@", "internal")
|
||||
SOURCES += locking/cluster_locking.c
|
||||
endif
|
||||
@ -167,8 +142,6 @@ LIB_STATIC = $(LIB_NAME).a
|
||||
|
||||
ifeq ($(MAKECMDGOALS),distclean)
|
||||
SUBDIRS =\
|
||||
format1 \
|
||||
format_pool \
|
||||
notify \
|
||||
locking
|
||||
endif
|
||||
|
@ -37,19 +37,6 @@
|
||||
|
||||
#define _skip(fmt, args...) log_very_verbose("Skipping: " fmt , ## args)
|
||||
|
||||
int lvm1_present(struct cmd_context *cmd)
|
||||
{
|
||||
static char path[PATH_MAX];
|
||||
|
||||
if (dm_snprintf(path, sizeof(path), "%s/lvm/global", cmd->proc_dir)
|
||||
< 0) {
|
||||
log_error("LVM1 proc global snprintf failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (path_exists(path)) ? 1 : 0;
|
||||
}
|
||||
|
||||
int list_segment_modules(struct dm_pool *mem, const struct lv_segment *seg,
|
||||
struct dm_list *modules)
|
||||
{
|
||||
|
@ -91,7 +91,6 @@ int activation(void);
|
||||
|
||||
int driver_version(char *version, size_t size);
|
||||
int library_version(char *version, size_t size);
|
||||
int lvm1_present(struct cmd_context *cmd);
|
||||
|
||||
int module_present(struct cmd_context *cmd, const char *target_name);
|
||||
int target_present_version(struct cmd_context *cmd, const char *target_name,
|
||||
|
10
lib/cache/lvmcache.c
vendored
10
lib/cache/lvmcache.c
vendored
@ -22,8 +22,6 @@
|
||||
#include "memlock.h"
|
||||
#include "str_list.h"
|
||||
#include "format-text.h"
|
||||
#include "format_pool.h"
|
||||
#include "format1.h"
|
||||
#include "config.h"
|
||||
|
||||
#include "lvmetad.h"
|
||||
@ -360,7 +358,8 @@ struct volume_group *lvmcache_get_saved_vg(const char *vgid, int precommitted)
|
||||
/* Do we need to actually set saved_vg_old to match saved_vg_new?
|
||||
* By just dropping old, we force a subsequent request for old to
|
||||
* reread it rather than just using new. */
|
||||
if (vginfo->saved_vg_old) {
|
||||
|
||||
if (vginfo->saved_vg_old && (vginfo->saved_vg_old->seqno < vg->seqno)) {
|
||||
log_debug_cache("lvmcache: drop saved_vg_old because new invalidates");
|
||||
_saved_vg_free(vginfo, 1, 0);
|
||||
}
|
||||
@ -425,7 +424,8 @@ struct volume_group *lvmcache_get_saved_vg_latest(const char *vgid)
|
||||
/* Do we need to actually set saved_vg_old to match saved_vg_new?
|
||||
* By just dropping old, we force a subsequent request for old to
|
||||
* reread it rather than just using new. */
|
||||
if (vginfo->saved_vg_old) {
|
||||
|
||||
if (vginfo->saved_vg_old && (vginfo->saved_vg_old->seqno < vg->seqno)) {
|
||||
log_debug_cache("lvmcache: drop saved_vg_old because new invalidates");
|
||||
_saved_vg_free(vginfo, 1, 0);
|
||||
}
|
||||
@ -479,8 +479,6 @@ void lvmcache_drop_metadata(const char *vgname, int drop_precommitted)
|
||||
/* For VG_ORPHANS, we need to invalidate all labels on orphan PVs. */
|
||||
if (!strcmp(vgname, VG_ORPHANS)) {
|
||||
_drop_metadata(FMT_TEXT_ORPHAN_VG_NAME, 0);
|
||||
_drop_metadata(FMT_LVM1_ORPHAN_VG_NAME, 0);
|
||||
_drop_metadata(FMT_POOL_ORPHAN_VG_NAME, 0);
|
||||
} else
|
||||
_drop_metadata(vgname, drop_precommitted);
|
||||
}
|
||||
|
23
lib/cache/lvmetad.c
vendored
23
lib/cache/lvmetad.c
vendored
@ -37,8 +37,6 @@ static const char *_lvmetad_socket = NULL;
|
||||
static struct cmd_context *_lvmetad_cmd = NULL;
|
||||
static int64_t _lvmetad_update_timeout;
|
||||
|
||||
static int _found_lvm1_metadata = 0;
|
||||
|
||||
static struct volume_group *_lvmetad_pvscan_vg(struct cmd_context *cmd, struct volume_group *vg, const char *vgid, struct format_type *fmt);
|
||||
|
||||
static uint64_t _monotonic_seconds(void)
|
||||
@ -2279,18 +2277,6 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev,
|
||||
if (!baton.fid)
|
||||
goto_bad;
|
||||
|
||||
if (fmt->features & FMT_OBSOLETE) {
|
||||
fmt->ops->destroy_instance(baton.fid);
|
||||
log_warn("WARNING: Disabling lvmetad cache which does not support obsolete (lvm1) metadata.");
|
||||
lvmetad_set_disabled(cmd, LVMETAD_DISABLE_REASON_LVM1);
|
||||
_found_lvm1_metadata = 1;
|
||||
/*
|
||||
* return 1 (success) so that we'll continue to populate lvmetad
|
||||
* instead of leaving the update incomplete.
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
lvmcache_foreach_mda(info, _lvmetad_pvscan_single, &baton);
|
||||
|
||||
if (!baton.vg)
|
||||
@ -2452,11 +2438,9 @@ int lvmetad_pvscan_all_devs(struct cmd_context *cmd, int do_wait)
|
||||
}
|
||||
|
||||
/*
|
||||
* If lvmetad is disabled, and no lvm1 metadata was seen and no
|
||||
* duplicate PVs were seen, then re-enable lvmetad.
|
||||
* If lvmetad is disabled, and no duplicate PVs were seen, then re-enable lvmetad.
|
||||
*/
|
||||
if (lvmetad_is_disabled(cmd, &reason) &&
|
||||
!lvmcache_found_duplicate_pvs() && !_found_lvm1_metadata) {
|
||||
if (lvmetad_is_disabled(cmd, &reason) && !lvmcache_found_duplicate_pvs()) {
|
||||
log_debug_lvmetad("Enabling lvmetad which was previously disabled.");
|
||||
lvmetad_clear_disabled(cmd);
|
||||
}
|
||||
@ -3072,9 +3056,6 @@ int lvmetad_is_disabled(struct cmd_context *cmd, const char **reason)
|
||||
} else if (strstr(reply_reason, LVMETAD_DISABLE_REASON_REPAIR)) {
|
||||
*reason = "a repair command was run";
|
||||
|
||||
} else if (strstr(reply_reason, LVMETAD_DISABLE_REASON_LVM1)) {
|
||||
*reason = "LVM1 metadata was found";
|
||||
|
||||
} else if (strstr(reply_reason, LVMETAD_DISABLE_REASON_DUPLICATES)) {
|
||||
*reason = "duplicate PVs were found";
|
||||
|
||||
|
@ -36,14 +36,6 @@
|
||||
#include "sharedlib.h"
|
||||
#endif
|
||||
|
||||
#ifdef LVM1_INTERNAL
|
||||
#include "format1.h"
|
||||
#endif
|
||||
|
||||
#ifdef POOL_INTERNAL
|
||||
#include "format_pool.h"
|
||||
#endif
|
||||
|
||||
#include <locale.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/syscall.h>
|
||||
@ -1142,6 +1134,13 @@ static struct dev_filter *_init_lvmetad_filter_chain(struct cmd_context *cmd)
|
||||
}
|
||||
nr_filt++;
|
||||
|
||||
/* signature filter. Required. */
|
||||
if (!(filters[nr_filt] = signature_filter_create(cmd->dev_types))) {
|
||||
log_error("Failed to create signature device filter");
|
||||
goto bad;
|
||||
}
|
||||
nr_filt++;
|
||||
|
||||
/* md component filter. Optional, non-critical. */
|
||||
if (find_config_tree_bool(cmd, devices_md_component_detection_CFG, NULL)) {
|
||||
init_md_filtering(1);
|
||||
@ -1341,20 +1340,6 @@ static int _init_formats(struct cmd_context *cmd)
|
||||
const struct dm_config_node *cn;
|
||||
#endif
|
||||
|
||||
#ifdef LVM1_INTERNAL
|
||||
if (!(fmt = init_lvm1_format(cmd)))
|
||||
return 0;
|
||||
fmt->library = NULL;
|
||||
dm_list_add(&cmd->formats, &fmt->list);
|
||||
#endif
|
||||
|
||||