master - tests: add gfs-pool test
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=11436b00e0fa4a54ce5...
Commit: 11436b00e0fa4a54ce504beba72b23bbf0682b27
Parent: 24e7745d7a54c6ef66cc76ebe2358a1bf2d3bd20
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue May 1 15:24:42 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue May 1 15:24:42 2018 -0500
tests: add gfs-pool test
Put back a test like the old one that was removed
in d709d8445f206b67cfc06266ce7553f9cb6f3df5.
It verifies that lvm will ignore and not use a
gfs-pool device.
---
test/shell/pool-labels.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/test/shell/pool-labels.sh b/test/shell/pool-labels.sh
new file mode 100644
index 0000000..7ae203d
--- /dev/null
+++ b/test/shell/pool-labels.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# lvmetad does not handle pool labels so skip test.
+SKIP_WITH_LVMLOCKD=1
+SKIP_WITH_LVMETAD=1
+SKIP_WITH_LVMPOLLD=1
+
+. lib/inittest
+
+env printf "" || skip # skip if printf is not available
+
+# create the old GFS pool labeled linear devices
+create_pool_label_()
+{
+ # FIXME
+ # echo -e is bashism, dash builtin sh doesn't do \xNN in printf either
+ # printf comes from coreutils, and is probably not posix either
+ env printf "\x01\x16\x70\x06\x5f\xcf\xff\xb9\xf8\x24\x8apool1" | dd of="$2" bs=5 seek=1 conv=notrunc
+ env printf "\x04\x01\x03\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0$1\x68\x01\x16\x70\x00\x00\x00\x00\x00\x06\x5f\xd0" | dd of=$2 bs=273 seek=1 conv=notrunc
+ aux notify_lvmetad "$2"
+}
+
+
+aux prepare_devs 2
+
+create_pool_label_ 0 "$dev1"
+create_pool_label_ 1 "$dev2"
+
+# verify that lvm will ignore and not use a gfs-pool device
+
+not pvs "$dev1"
+
+# check that pvcreate fails without -ff on the pool device
+not pvcreate "$dev1"
+
5 years, 11 months
master - devices: ignore lvm1 and pool devices
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=24e7745d7a54c6ef66c...
Commit: 24e7745d7a54c6ef66cc76ebe2358a1bf2d3bd20
Parent: db0560c1b0e63bff7c696488cee338653f02545a
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue May 1 14:32:15 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue May 1 15:18:47 2018 -0500
devices: ignore lvm1 and pool devices
---
lib/Makefile.in | 2 +
lib/commands/toolcontext.c | 7 ++
lib/device/dev-lvm1-pool.c | 174 ++++++++++++++++++++++++++++++++++++++++
lib/device/dev-type.h | 3 +
lib/filters/filter-signature.c | 96 ++++++++++++++++++++++
lib/filters/filter.h | 1 +
6 files changed, 283 insertions(+), 0 deletions(-)
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 8b87662..dbe7b90 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -37,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 \
@@ -51,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 \
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 64c9b1a..7f74c7e 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -1134,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);
diff --git a/lib/device/dev-lvm1-pool.c b/lib/device/dev-lvm1-pool.c
new file mode 100644
index 0000000..1fc3805
--- /dev/null
+++ b/lib/device/dev-lvm1-pool.c
@@ -0,0 +1,174 @@
+/*
+ * Copyright (C) 2018 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of LVM2.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License v.2.1.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "lib.h"
+#include "dev-type.h"
+#include "xlate.h"
+
+/*
+ * These lvm1 structs just used NAME_LEN in the previous format1 lvm2 code, but
+ * NAME_LEN was defined as 128 in generic lvm2 code that was not lvm1-specific
+ * and not disk-format-specific.
+ */
+
+#define LVM1_NAME_LEN 128
+
+struct data_area {
+ uint32_t base;
+ uint32_t size;
+} __attribute__ ((packed));
+
+struct pv_disk {
+ int8_t id[2];
+ uint16_t version; /* lvm version */
+ struct data_area pv_on_disk;
+ struct data_area vg_on_disk;
+ struct data_area pv_uuidlist_on_disk;
+ struct data_area lv_on_disk;
+ struct data_area pe_on_disk;
+ int8_t pv_uuid[LVM1_NAME_LEN];
+ int8_t vg_name[LVM1_NAME_LEN];
+ int8_t system_id[LVM1_NAME_LEN]; /* for vgexport/vgimport */
+ uint32_t pv_major;
+ uint32_t pv_number;
+ uint32_t pv_status;
+ uint32_t pv_allocatable;
+ uint32_t pv_size;
+ uint32_t lv_cur;
+ uint32_t pe_size;
+ uint32_t pe_total;
+ uint32_t pe_allocated;
+
+ /* only present on version == 2 pv's */
+ uint32_t pe_start;
+} __attribute__ ((packed));
+
+
+int dev_is_lvm1(struct device *dev, char *buf, int buflen)
+{
+ struct pv_disk *pvd = (struct pv_disk *) buf;
+ uint32_t version;
+ int ret;
+
+ version = xlate16(pvd->version);
+
+ if (pvd->id[0] == 'H' && pvd->id[1] == 'M' &&
+ (version == 1 || version == 2))
+ ret = 1;
+ else
+ ret = 0;
+
+ return ret;
+}
+
+
+#define POOL_MAGIC 0x011670
+#define POOL_NAME_SIZE 256
+
+#define NSPMajorVersion 4
+#define NSPMinorVersion 1
+#define NSPUpdateLevel 3
+
+/* When checking for version matching, the first two numbers **
+** are important for metadata formats, a.k.a pool labels. **
+** All the numbers are important when checking if the user **
+** space tools match up with the kernel module............. */
+
+#define POOL_VERSION (NSPMajorVersion << 16 | \
+ NSPMinorVersion << 8 | \
+ NSPUpdateLevel)
+
+struct pool_disk {
+ uint64_t pl_magic; /* Pool magic number */
+ uint64_t pl_pool_id; /* Unique pool identifier */
+ char pl_pool_name[POOL_NAME_SIZE]; /* Name of pool */
+ uint32_t pl_version; /* Pool version */
+ uint32_t pl_subpools; /* Number of subpools in this pool */
+ uint32_t pl_sp_id; /* Subpool number within pool */
+ uint32_t pl_sp_devs; /* Number of data partitions in this subpool */
+ uint32_t pl_sp_devid; /* Partition number within subpool */
+ uint32_t pl_sp_type; /* Partition type */
+ uint64_t pl_blocks; /* Number of blocks in this partition */
+ uint32_t pl_striping; /* Striping size within subpool */
+ /*
+ * If the number of DMEP devices is zero, then the next field **
+ * ** (pl_sp_dmepid) becomes the subpool ID for redirection. In **
+ * ** other words, if this subpool does not have the capability **
+ * ** to do DMEP, then it must specify which subpool will do it **
+ * ** in it's place
+ */
+
+ /*
+ * While the next 3 field are no longer used, they must stay to keep **
+ * ** backward compatibility...........................................
+ */
+ uint32_t pl_sp_dmepdevs;/* Number of dmep devices in this subpool */
+ uint32_t pl_sp_dmepid; /* Dmep device number within subpool */
+ uint32_t pl_sp_weight; /* if dmep dev, pref to using it */
+
+ uint32_t pl_minor; /* the pool minor number */
+ uint32_t pl_padding; /* reminder - think about alignment */
+
+ /*
+ * Even though we're zeroing out 8k at the front of the disk before
+ * writing the label, putting this in
+ */
+ char pl_reserve[184]; /* bump the structure size out to 512 bytes */
+};
+
+#define CPIN_8(x, y, z) {memcpy((x), (y), (z));}
+#define CPIN_16(x, y) {(x) = xlate16_be((y));}
+#define CPIN_32(x, y) {(x) = xlate32_be((y));}
+#define CPIN_64(x, y) {(x) = xlate64_be((y));}
+
+static void pool_label_in(struct pool_disk *pl, void *buf)
+{
+ struct pool_disk *bufpl = (struct pool_disk *) buf;
+
+ CPIN_64(pl->pl_magic, bufpl->pl_magic);
+ CPIN_64(pl->pl_pool_id, bufpl->pl_pool_id);
+ CPIN_8(pl->pl_pool_name, bufpl->pl_pool_name, POOL_NAME_SIZE);
+ CPIN_32(pl->pl_version, bufpl->pl_version);
+ CPIN_32(pl->pl_subpools, bufpl->pl_subpools);
+ CPIN_32(pl->pl_sp_id, bufpl->pl_sp_id);
+ CPIN_32(pl->pl_sp_devs, bufpl->pl_sp_devs);
+ CPIN_32(pl->pl_sp_devid, bufpl->pl_sp_devid);
+ CPIN_32(pl->pl_sp_type, bufpl->pl_sp_type);
+ CPIN_64(pl->pl_blocks, bufpl->pl_blocks);
+ CPIN_32(pl->pl_striping, bufpl->pl_striping);
+ CPIN_32(pl->pl_sp_dmepdevs, bufpl->pl_sp_dmepdevs);
+ CPIN_32(pl->pl_sp_dmepid, bufpl->pl_sp_dmepid);
+ CPIN_32(pl->pl_sp_weight, bufpl->pl_sp_weight);
+ CPIN_32(pl->pl_minor, bufpl->pl_minor);
+ CPIN_32(pl->pl_padding, bufpl->pl_padding);
+ CPIN_8(pl->pl_reserve, bufpl->pl_reserve, 184);
+}
+
+int dev_is_pool(struct device *dev, char *buf, int buflen)
+{
+ struct pool_disk pd;
+ int ret;
+
+ pool_label_in(&pd, buf);
+
+ /* can ignore 8 rightmost bits for ondisk format check */
+ if ((pd.pl_magic == POOL_MAGIC) &&
+ (pd.pl_version >> 8 == POOL_VERSION >> 8))
+ ret = 1;
+ else
+ ret = 0;
+
+ return ret;
+}
+
diff --git a/lib/device/dev-type.h b/lib/device/dev-type.h
index b0adfe2..e48e22b 100644
--- a/lib/device/dev-type.h
+++ b/lib/device/dev-type.h
@@ -62,6 +62,9 @@ int dev_is_luks(struct device *dev, uint64_t *signature);
int dasd_is_cdl_formatted(struct device *dev);
int udev_dev_is_mpath_component(struct device *dev);
+int dev_is_lvm1(struct device *dev, char *buf, int buflen);
+int dev_is_pool(struct device *dev, char *buf, int buflen);
+
/* Signature wiping. */
#define TYPE_LVM1_MEMBER 0x001
#define TYPE_LVM2_MEMBER 0x002
diff --git a/lib/filters/filter-signature.c b/lib/filters/filter-signature.c
new file mode 100644
index 0000000..b426476
--- /dev/null
+++ b/lib/filters/filter-signature.c
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2004 Luca Berra
+ * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of LVM2.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License v.2.1.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "lib.h"
+#include "filter.h"
+
+#ifdef __linux__
+
+#define BUFSIZE 4096
+
+static int _ignore_signature(struct dev_filter *f __attribute__((unused)),
+ struct device *dev)
+{
+ char buf[BUFSIZE];
+ int ret = 0;
+
+ if (!dev_open_readonly(dev)) {
+ stack;
+ return -1;
+ }
+
+ memset(buf, 0, BUFSIZE);
+
+ if (!dev_read(dev, 0, BUFSIZE, DEV_IO_SIGNATURES, buf)) {
+ log_debug_devs("%s: Skipping: error in signature detection",
+ dev_name(dev));
+ ret = 0;
+ goto out;
+ }
+
+ if (dev_is_lvm1(dev, buf, BUFSIZE)) {
+ log_debug_devs("%s: Skipping lvm1 device", dev_name(dev));
+ ret = 0;
+ goto out;
+ }
+
+ if (dev_is_pool(dev, buf, BUFSIZE)) {
+ log_debug_devs("%s: Skipping gfs-pool device", dev_name(dev));
+ ret = 0;
+ goto out;
+ }
+ ret = 1;
+
+out:
+ dev_close(dev);
+
+ return ret;
+}
+
+static void _destroy(struct dev_filter *f)
+{
+ if (f->use_count)
+ log_error(INTERNAL_ERROR "Destroying signature filter while in use %u times.", f->use_count);
+
+ dm_free(f);
+}
+
+struct dev_filter *signature_filter_create(struct dev_types *dt)
+{
+ struct dev_filter *f;
+
+ if (!(f = dm_zalloc(sizeof(*f)))) {
+ log_error("md filter allocation failed");
+ return NULL;
+ }
+
+ f->passes_filter = _ignore_signature;
+ f->destroy = _destroy;
+ f->use_count = 0;
+ f->private = dt;
+
+ log_debug_devs("signature filter initialised.");
+
+ return f;
+}
+
+#else
+
+struct dev_filter *signature_filter_create(struct dev_types *dt)
+{
+ return NULL;
+}
+
+#endif
diff --git a/lib/filters/filter.h b/lib/filters/filter.h
index d75f6e1..2f809dd 100644
--- a/lib/filters/filter.h
+++ b/lib/filters/filter.h
@@ -31,6 +31,7 @@ struct dev_filter *persistent_filter_create(struct dev_types *dt,
struct dev_filter *f,
const char *file);
struct dev_filter *sysfs_filter_create(void);
+struct dev_filter *signature_filter_create(struct dev_types *dt);
struct dev_filter *internal_filter_create(void);
int internal_filter_allow(struct dm_pool *mem, struct device *dev);
5 years, 11 months
master - Revert "build: Stop creating the symlinks in include/ on the fly."
by Joe Thornber
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1553993ea1e28222704...
Commit: 1553993ea1e28222704ac90e1765eef86ea9eff1
Parent: 3ea862bdfc036f6e5ce08ba01eb706d1d10638cd
Author: Joe Thornber <ejt(a)redhat.com>
AuthorDate: Tue May 1 20:03:51 2018 +0100
Committer: Joe Thornber <ejt(a)redhat.com>
CommitterDate: Tue May 1 20:03:51 2018 +0100
Revert "build: Stop creating the symlinks in include/ on the fly."
This reverts commit cdcea0bf55c170f538c3ffc114792eb3c993f4ac.
---
configure | 3 +-
configure.ac | 1 +
include/.gitignore | 6 ++-
include/.symlinks.in | 80 ++++++++++++++++++++++++++++++++++++++
include/Makefile.in | 20 +++++++++-
include/activate.h | 1 -
include/archiver.h | 1 -
include/bcache.h | 1 -
include/btree.h | 1 -
include/clvm.h | 1 -
include/config-util.h | 1 -
include/config.h | 1 -
include/config_settings.h | 1 -
include/crc.h | 1 -
include/daemon-client.h | 1 -
include/daemon-io.h | 1 -
include/defaults.h | 1 -
include/dev-cache.h | 1 -
include/dev-ext-udev-constants.h | 1 -
include/dev-type.h | 1 -
include/device-types.h | 1 -
include/device.h | 1 -
include/display.h | 1 -
include/dm-ioctl.h | 1 -
include/dm-log-userspace.h | 1 -
include/dm-logging.h | 1 -
include/dmlib.h | 1 -
include/filter.h | 1 -
include/format-text.h | 1 -
include/format1.h | 1 -
include/format_pool.h | 1 -
include/intl.h | 1 -
include/kdev_t.h | 1 -
include/label.h | 1 -
include/last-path-component.h | 1 -
include/lib.h | 1 -
include/libdevmapper-event.h | 1 -
include/libdevmapper.h | 1 -
include/locking.h | 1 -
include/log.h | 1 -
include/lv.h | 1 -
include/lv_alloc.h | 1 -
include/lvm-exec.h | 1 -
include/lvm-file.h | 1 -
include/lvm-flock.h | 1 -
include/lvm-globals.h | 1 -
include/lvm-logging.h | 1 -
include/lvm-maths.h | 1 -
include/lvm-percent.h | 1 -
include/lvm-signal.h | 1 -
include/lvm-string.h | 1 -
include/lvm-wrappers.h | 1 -
include/lvm2app.h | 1 -
include/lvm2cmd.h | 1 -
include/lvmcache.h | 1 -
include/lvmetad-client.h | 1 -
include/lvmetad.h | 1 -
include/lvmlockd-client.h | 1 -
include/lvmlockd.h | 1 -
include/lvmnotify.h | 1 -
include/lvmpolld-client.h | 1 -
include/lvmpolld-protocol.h | 1 -
include/memlock.h | 1 -
include/metadata-exported.h | 1 -
include/metadata.h | 1 -
include/pogen.h | 1 -
include/polldaemon.h | 1 -
include/polling_ops.h | 1 -
include/prop_common.h | 1 -
include/properties.h | 1 -
include/pv.h | 1 -
include/pv_alloc.h | 1 -
include/report.h | 1 -
include/segtype.h | 1 -
include/sharedlib.h | 1 -
include/str_list.h | 1 -
include/targets.h | 1 -
include/text_export.h | 1 -
include/text_import.h | 1 -
include/tool.h | 1 -
include/toolcontext.h | 1 -
include/util.h | 1 -
include/uuid.h | 1 -
include/vg.h | 1 -
include/xlate.h | 1 -
make.tmpl.in | 10 +++--
86 files changed, 112 insertions(+), 88 deletions(-)
diff --git a/configure b/configure
index 844e628..6400e82 100755
--- a/configure
+++ b/configure
@@ -15583,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/locking/Makefile include/lvm-version.h libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/li
blvm2app.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_syst
emd_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/lv
m2_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
@@ -16305,6 +16305,7 @@ 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/locking/Makefile") CONFIG_FILES="$CONFIG_FILES lib/locking/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 811357f..dc01a8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2128,6 +2128,7 @@ 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
diff --git a/include/.gitignore b/include/.gitignore
index 396884b..4971e07 100644
--- a/include/.gitignore
+++ b/include/.gitignore
@@ -1,2 +1,4 @@
-configure.h
-lvm-version.h
+.symlinks
+.symlinks_created
+
+*.h
diff --git a/include/.symlinks.in b/include/.symlinks.in
new file mode 100644
index 0000000..3d50750
--- /dev/null
+++ b/include/.symlinks.in
@@ -0,0 +1,80 @@
+@top_srcdir(a)/daemons/clvmd/clvm.h
+@top_srcdir(a)/daemons/dmeventd/libdevmapper-event.h
+@top_srcdir(a)/daemons/lvmetad/lvmetad-client.h
+@top_srcdir(a)/daemons/lvmlockd/lvmlockd-client.h
+@top_srcdir(a)/daemons/lvmpolld/lvmpolld-protocol.h
+@top_srcdir(a)/daemons/lvmpolld/polling_ops.h
+@top_srcdir(a)/lib/activate/activate.h
+@top_srcdir(a)/lib/activate/targets.h
+@top_srcdir(a)/lib/cache/lvmcache.h
+@top_srcdir(a)/lib/cache/lvmetad.h
+@top_srcdir(a)/lib/commands/toolcontext.h
+@top_srcdir(a)/lib/config/config.h
+@top_srcdir(a)/lib/config/config_settings.h
+@top_srcdir(a)/lib/config/defaults.h
+@top_srcdir(a)/lib/datastruct/btree.h
+@top_srcdir(a)/lib/datastruct/str_list.h
+@top_srcdir(a)/lib/device/bcache.h
+@top_srcdir(a)/lib/device/dev-cache.h
+@top_srcdir(a)/lib/device/dev-ext-udev-constants.h
+@top_srcdir(a)/lib/device/dev-type.h
+@top_srcdir(a)/lib/device/device-types.h
+@top_srcdir(a)/lib/device/device.h
+@top_srcdir(a)/lib/display/display.h
+@top_srcdir(a)/lib/filters/filter.h
+@top_srcdir(a)/lib/format1/format1.h
+@top_srcdir(a)/lib/format_pool/format_pool.h
+@top_srcdir(a)/lib/format_text/archiver.h
+@top_srcdir(a)/lib/format_text/format-text.h
+@top_srcdir(a)/lib/format_text/text_export.h
+@top_srcdir(a)/lib/format_text/text_import.h
+@top_srcdir(a)/lib/label/label.h
+@top_srcdir(a)/lib/locking/locking.h
+@top_srcdir(a)/lib/locking/lvmlockd.h
+@top_srcdir(a)/lib/log/log.h
+@top_srcdir(a)/lib/log/lvm-logging.h
+@top_srcdir(a)/lib/lvmpolld/lvmpolld-client.h
+@top_srcdir(a)/lib/lvmpolld/polldaemon.h
+@top_srcdir(a)/lib/metadata/lv.h
+@top_srcdir(a)/lib/metadata/lv_alloc.h
+@top_srcdir(a)/lib/metadata/metadata-exported.h
+@top_srcdir(a)/lib/metadata/metadata.h
+@top_srcdir(a)/lib/metadata/pv.h
+@top_srcdir(a)/lib/metadata/pv_alloc.h
+@top_srcdir(a)/lib/metadata/segtype.h
+@top_srcdir(a)/lib/metadata/vg.h
+@top_srcdir(a)/lib/misc/crc.h
+@top_srcdir(a)/lib/misc/intl.h
+@top_srcdir(a)/lib/misc/last-path-component.h
+@top_srcdir(a)/lib/misc/lib.h
+@top_srcdir(a)/lib/misc/lvm-exec.h
+@top_srcdir(a)/lib/misc/lvm-file.h
+@top_srcdir(a)/lib/misc/lvm-flock.h
+@top_srcdir(a)/lib/misc/lvm-globals.h
+@top_srcdir(a)/lib/misc/lvm-maths.h
+@top_srcdir(a)/lib/misc/lvm-percent.h
+@top_srcdir(a)/lib/misc/lvm-signal.h
+@top_srcdir(a)/lib/misc/lvm-string.h
+@top_srcdir(a)/lib/misc/lvm-wrappers.h
+@top_srcdir(a)/lib/misc/sharedlib.h
+@top_srcdir(a)/lib/misc/util.h
+@top_srcdir(a)/lib/mm/memlock.h
+@top_srcdir(a)/lib/mm/xlate.h
+@top_srcdir(a)/lib/notify/lvmnotify.h
+@top_srcdir(a)/lib/properties/prop_common.h
+@top_srcdir(a)/lib/report/properties.h
+@top_srcdir(a)/lib/report/report.h
+@top_srcdir(a)/lib/uuid/uuid.h
+@top_srcdir(a)/libdaemon/client/config-util.h
+@top_srcdir(a)/libdaemon/client/daemon-client.h
+@top_srcdir(a)/libdaemon/client/daemon-io.h
+@top_srcdir(a)/libdm/libdevmapper.h
+@top_srcdir(a)/libdm/misc/dm-ioctl.h
+@top_srcdir(a)/libdm/misc/dm-log-userspace.h
+@top_srcdir(a)/libdm/misc/dm-logging.h
+@top_srcdir(a)/libdm/misc/dmlib.h
+@top_srcdir(a)/libdm/misc/kdev_t.h
+@top_srcdir(a)/liblvm/lvm2app.h
+@top_srcdir(a)/po/pogen.h
+@top_srcdir(a)/tools/lvm2cmd.h
+@top_srcdir(a)/tools/tool.h
diff --git a/include/Makefile.in b/include/Makefile.in
index e5c09b5..b2571fd 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -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
diff --git a/include/activate.h b/include/activate.h
deleted file mode 120000
index 3c8d94a..0000000
--- a/include/activate.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/activate/activate.h
\ No newline at end of file
diff --git a/include/archiver.h b/include/archiver.h
deleted file mode 120000
index bac9048..0000000
--- a/include/archiver.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/format_text/archiver.h
\ No newline at end of file
diff --git a/include/bcache.h b/include/bcache.h
deleted file mode 120000
index 5855f8d..0000000
--- a/include/bcache.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/device/bcache.h
\ No newline at end of file
diff --git a/include/btree.h b/include/btree.h
deleted file mode 120000
index e45aee4..0000000
--- a/include/btree.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/datastruct/btree.h
\ No newline at end of file
diff --git a/include/clvm.h b/include/clvm.h
deleted file mode 120000
index 9740db4..0000000
--- a/include/clvm.h
+++ /dev/null
@@ -1 +0,0 @@
-../daemons/clvmd/clvm.h
\ No newline at end of file
diff --git a/include/config-util.h b/include/config-util.h
deleted file mode 120000
index 4b7b220..0000000
--- a/include/config-util.h
+++ /dev/null
@@ -1 +0,0 @@
-../libdaemon/client/config-util.h
\ No newline at end of file
diff --git a/include/config.h b/include/config.h
deleted file mode 120000
index a733942..0000000
--- a/include/config.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/config/config.h
\ No newline at end of file
diff --git a/include/config_settings.h b/include/config_settings.h
deleted file mode 120000
index 407d594..0000000
--- a/include/config_settings.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/config/config_settings.h
\ No newline at end of file
diff --git a/include/crc.h b/include/crc.h
deleted file mode 120000
index 25c761a..0000000
--- a/include/crc.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/crc.h
\ No newline at end of file
diff --git a/include/daemon-client.h b/include/daemon-client.h
deleted file mode 120000
index 7dbf53f..0000000
--- a/include/daemon-client.h
+++ /dev/null
@@ -1 +0,0 @@
-../libdaemon/client/daemon-client.h
\ No newline at end of file
diff --git a/include/daemon-io.h b/include/daemon-io.h
deleted file mode 120000
index 79612d9..0000000
--- a/include/daemon-io.h
+++ /dev/null
@@ -1 +0,0 @@
-../libdaemon/client/daemon-io.h
\ No newline at end of file
diff --git a/include/defaults.h b/include/defaults.h
deleted file mode 120000
index c97f06f..0000000
--- a/include/defaults.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/config/defaults.h
\ No newline at end of file
diff --git a/include/dev-cache.h b/include/dev-cache.h
deleted file mode 120000
index edb7395..0000000
--- a/include/dev-cache.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/device/dev-cache.h
\ No newline at end of file
diff --git a/include/dev-ext-udev-constants.h b/include/dev-ext-udev-constants.h
deleted file mode 120000
index 97258ef..0000000
--- a/include/dev-ext-udev-constants.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/device/dev-ext-udev-constants.h
\ No newline at end of file
diff --git a/include/dev-type.h b/include/dev-type.h
deleted file mode 120000
index 8082a76..0000000
--- a/include/dev-type.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/device/dev-type.h
\ No newline at end of file
diff --git a/include/device-types.h b/include/device-types.h
deleted file mode 120000
index 452a6fa..0000000
--- a/include/device-types.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/device/device-types.h
\ No newline at end of file
diff --git a/include/device.h b/include/device.h
deleted file mode 120000
index ee365d9..0000000
--- a/include/device.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/device/device.h
\ No newline at end of file
diff --git a/include/display.h b/include/display.h
deleted file mode 120000
index b614ede..0000000
--- a/include/display.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/display/display.h
\ No newline at end of file
diff --git a/include/dm-ioctl.h b/include/dm-ioctl.h
deleted file mode 120000
index 4acd5a5..0000000
--- a/include/dm-ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
-../libdm/misc/dm-ioctl.h
\ No newline at end of file
diff --git a/include/dm-log-userspace.h b/include/dm-log-userspace.h
deleted file mode 120000
index 37c9fea..0000000
--- a/include/dm-log-userspace.h
+++ /dev/null
@@ -1 +0,0 @@
-../libdm/misc/dm-log-userspace.h
\ No newline at end of file
diff --git a/include/dm-logging.h b/include/dm-logging.h
deleted file mode 120000
index 2af311e..0000000
--- a/include/dm-logging.h
+++ /dev/null
@@ -1 +0,0 @@
-../libdm/misc/dm-logging.h
\ No newline at end of file
diff --git a/include/dmlib.h b/include/dmlib.h
deleted file mode 120000
index 6e99e60..0000000
--- a/include/dmlib.h
+++ /dev/null
@@ -1 +0,0 @@
-../libdm/misc/dmlib.h
\ No newline at end of file
diff --git a/include/filter.h b/include/filter.h
deleted file mode 120000
index c22ea16..0000000
--- a/include/filter.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/filters/filter.h
\ No newline at end of file
diff --git a/include/format-text.h b/include/format-text.h
deleted file mode 120000
index ca81b1d..0000000
--- a/include/format-text.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/format_text/format-text.h
\ No newline at end of file
diff --git a/include/format1.h b/include/format1.h
deleted file mode 120000
index 4e23bc9..0000000
--- a/include/format1.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/format1/format1.h
\ No newline at end of file
diff --git a/include/format_pool.h b/include/format_pool.h
deleted file mode 120000
index 7198a37..0000000
--- a/include/format_pool.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/format_pool/format_pool.h
\ No newline at end of file
diff --git a/include/intl.h b/include/intl.h
deleted file mode 120000
index 6db3a2b..0000000
--- a/include/intl.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/intl.h
\ No newline at end of file
diff --git a/include/kdev_t.h b/include/kdev_t.h
deleted file mode 120000
index 1d04a72..0000000
--- a/include/kdev_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../libdm/misc/kdev_t.h
\ No newline at end of file
diff --git a/include/label.h b/include/label.h
deleted file mode 120000
index 0af47ca..0000000
--- a/include/label.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/label/label.h
\ No newline at end of file
diff --git a/include/last-path-component.h b/include/last-path-component.h
deleted file mode 120000
index 58f8bad..0000000
--- a/include/last-path-component.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/last-path-component.h
\ No newline at end of file
diff --git a/include/lib.h b/include/lib.h
deleted file mode 120000
index 912ac0c..0000000
--- a/include/lib.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/lib.h
\ No newline at end of file
diff --git a/include/libdevmapper-event.h b/include/libdevmapper-event.h
deleted file mode 120000
index a54561d..0000000
--- a/include/libdevmapper-event.h
+++ /dev/null
@@ -1 +0,0 @@
-../daemons/dmeventd/libdevmapper-event.h
\ No newline at end of file
diff --git a/include/libdevmapper.h b/include/libdevmapper.h
deleted file mode 120000
index a88009b..0000000
--- a/include/libdevmapper.h
+++ /dev/null
@@ -1 +0,0 @@
-../libdm/libdevmapper.h
\ No newline at end of file
diff --git a/include/locking.h b/include/locking.h
deleted file mode 120000
index 6ea3343..0000000
--- a/include/locking.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/locking/locking.h
\ No newline at end of file
diff --git a/include/log.h b/include/log.h
deleted file mode 120000
index 245ac3d..0000000
--- a/include/log.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/log/log.h
\ No newline at end of file
diff --git a/include/lv.h b/include/lv.h
deleted file mode 120000
index 7cd7de6..0000000
--- a/include/lv.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/metadata/lv.h
\ No newline at end of file
diff --git a/include/lv_alloc.h b/include/lv_alloc.h
deleted file mode 120000
index bbb691c..0000000
--- a/include/lv_alloc.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/metadata/lv_alloc.h
\ No newline at end of file
diff --git a/include/lvm-exec.h b/include/lvm-exec.h
deleted file mode 120000
index 5b5232a..0000000
--- a/include/lvm-exec.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/lvm-exec.h
\ No newline at end of file
diff --git a/include/lvm-file.h b/include/lvm-file.h
deleted file mode 120000
index bcb8288..0000000
--- a/include/lvm-file.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/lvm-file.h
\ No newline at end of file
diff --git a/include/lvm-flock.h b/include/lvm-flock.h
deleted file mode 120000
index e1ef682..0000000
--- a/include/lvm-flock.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/lvm-flock.h
\ No newline at end of file
diff --git a/include/lvm-globals.h b/include/lvm-globals.h
deleted file mode 120000
index 767f63d..0000000
--- a/include/lvm-globals.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/lvm-globals.h
\ No newline at end of file
diff --git a/include/lvm-logging.h b/include/lvm-logging.h
deleted file mode 120000
index 9236bad..0000000
--- a/include/lvm-logging.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/log/lvm-logging.h
\ No newline at end of file
diff --git a/include/lvm-maths.h b/include/lvm-maths.h
deleted file mode 120000
index 45a0815..0000000
--- a/include/lvm-maths.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/lvm-maths.h
\ No newline at end of file
diff --git a/include/lvm-percent.h b/include/lvm-percent.h
deleted file mode 120000
index 3160573..0000000
--- a/include/lvm-percent.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/lvm-percent.h
\ No newline at end of file
diff --git a/include/lvm-signal.h b/include/lvm-signal.h
deleted file mode 120000
index d987311..0000000
--- a/include/lvm-signal.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/lvm-signal.h
\ No newline at end of file
diff --git a/include/lvm-string.h b/include/lvm-string.h
deleted file mode 120000
index f727b1e..0000000
--- a/include/lvm-string.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/lvm-string.h
\ No newline at end of file
diff --git a/include/lvm-wrappers.h b/include/lvm-wrappers.h
deleted file mode 120000
index 424679a..0000000
--- a/include/lvm-wrappers.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/lvm-wrappers.h
\ No newline at end of file
diff --git a/include/lvm2app.h b/include/lvm2app.h
deleted file mode 120000
index 17f2006..0000000
--- a/include/lvm2app.h
+++ /dev/null
@@ -1 +0,0 @@
-../liblvm/lvm2app.h
\ No newline at end of file
diff --git a/include/lvm2cmd.h b/include/lvm2cmd.h
deleted file mode 120000
index 9d27330..0000000
--- a/include/lvm2cmd.h
+++ /dev/null
@@ -1 +0,0 @@
-../tools/lvm2cmd.h
\ No newline at end of file
diff --git a/include/lvmcache.h b/include/lvmcache.h
deleted file mode 120000
index ba1399c..0000000
--- a/include/lvmcache.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/cache/lvmcache.h
\ No newline at end of file
diff --git a/include/lvmetad-client.h b/include/lvmetad-client.h
deleted file mode 120000
index 54b8f1f..0000000
--- a/include/lvmetad-client.h
+++ /dev/null
@@ -1 +0,0 @@
-../daemons/lvmetad/lvmetad-client.h
\ No newline at end of file
diff --git a/include/lvmetad.h b/include/lvmetad.h
deleted file mode 120000
index 65c561c..0000000
--- a/include/lvmetad.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/cache/lvmetad.h
\ No newline at end of file
diff --git a/include/lvmlockd-client.h b/include/lvmlockd-client.h
deleted file mode 120000
index 23291c2..0000000
--- a/include/lvmlockd-client.h
+++ /dev/null
@@ -1 +0,0 @@
-../daemons/lvmlockd/lvmlockd-client.h
\ No newline at end of file
diff --git a/include/lvmlockd.h b/include/lvmlockd.h
deleted file mode 120000
index 1fe51a6..0000000
--- a/include/lvmlockd.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/locking/lvmlockd.h
\ No newline at end of file
diff --git a/include/lvmnotify.h b/include/lvmnotify.h
deleted file mode 120000
index 7c624a7..0000000
--- a/include/lvmnotify.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/notify/lvmnotify.h
\ No newline at end of file
diff --git a/include/lvmpolld-client.h b/include/lvmpolld-client.h
deleted file mode 120000
index 78de8c6..0000000
--- a/include/lvmpolld-client.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/lvmpolld/lvmpolld-client.h
\ No newline at end of file
diff --git a/include/lvmpolld-protocol.h b/include/lvmpolld-protocol.h
deleted file mode 120000
index 5f5ecb5..0000000
--- a/include/lvmpolld-protocol.h
+++ /dev/null
@@ -1 +0,0 @@
-../daemons/lvmpolld/lvmpolld-protocol.h
\ No newline at end of file
diff --git a/include/memlock.h b/include/memlock.h
deleted file mode 120000
index 8d9bc4b..0000000
--- a/include/memlock.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/mm/memlock.h
\ No newline at end of file
diff --git a/include/metadata-exported.h b/include/metadata-exported.h
deleted file mode 120000
index 570ab36..0000000
--- a/include/metadata-exported.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/metadata/metadata-exported.h
\ No newline at end of file
diff --git a/include/metadata.h b/include/metadata.h
deleted file mode 120000
index 94fbad4..0000000
--- a/include/metadata.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/metadata/metadata.h
\ No newline at end of file
diff --git a/include/pogen.h b/include/pogen.h
deleted file mode 120000
index 9721487..0000000
--- a/include/pogen.h
+++ /dev/null
@@ -1 +0,0 @@
-../po/pogen.h
\ No newline at end of file
diff --git a/include/polldaemon.h b/include/polldaemon.h
deleted file mode 120000
index 7816b0b..0000000
--- a/include/polldaemon.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/lvmpolld/polldaemon.h
\ No newline at end of file
diff --git a/include/polling_ops.h b/include/polling_ops.h
deleted file mode 120000
index 4ec0a30..0000000
--- a/include/polling_ops.h
+++ /dev/null
@@ -1 +0,0 @@
-../daemons/lvmpolld/polling_ops.h
\ No newline at end of file
diff --git a/include/prop_common.h b/include/prop_common.h
deleted file mode 120000
index 40b570e..0000000
--- a/include/prop_common.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/properties/prop_common.h
\ No newline at end of file
diff --git a/include/properties.h b/include/properties.h
deleted file mode 120000
index f34e413..0000000
--- a/include/properties.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/report/properties.h
\ No newline at end of file
diff --git a/include/pv.h b/include/pv.h
deleted file mode 120000
index dd3267b..0000000
--- a/include/pv.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/metadata/pv.h
\ No newline at end of file
diff --git a/include/pv_alloc.h b/include/pv_alloc.h
deleted file mode 120000
index 2364a8d..0000000
--- a/include/pv_alloc.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/metadata/pv_alloc.h
\ No newline at end of file
diff --git a/include/report.h b/include/report.h
deleted file mode 120000
index 339bf85..0000000
--- a/include/report.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/report/report.h
\ No newline at end of file
diff --git a/include/segtype.h b/include/segtype.h
deleted file mode 120000
index 6b69bfd..0000000
--- a/include/segtype.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/metadata/segtype.h
\ No newline at end of file
diff --git a/include/sharedlib.h b/include/sharedlib.h
deleted file mode 120000
index dacb595..0000000
--- a/include/sharedlib.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/sharedlib.h
\ No newline at end of file
diff --git a/include/str_list.h b/include/str_list.h
deleted file mode 120000
index dd91b1d..0000000
--- a/include/str_list.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/datastruct/str_list.h
\ No newline at end of file
diff --git a/include/targets.h b/include/targets.h
deleted file mode 120000
index a63c09a..0000000
--- a/include/targets.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/activate/targets.h
\ No newline at end of file
diff --git a/include/text_export.h b/include/text_export.h
deleted file mode 120000
index 4ef5b96..0000000
--- a/include/text_export.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/format_text/text_export.h
\ No newline at end of file
diff --git a/include/text_import.h b/include/text_import.h
deleted file mode 120000
index 33509d3..0000000
--- a/include/text_import.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/format_text/text_import.h
\ No newline at end of file
diff --git a/include/tool.h b/include/tool.h
deleted file mode 120000
index d8b2651..0000000
--- a/include/tool.h
+++ /dev/null
@@ -1 +0,0 @@
-../tools/tool.h
\ No newline at end of file
diff --git a/include/toolcontext.h b/include/toolcontext.h
deleted file mode 120000
index c26097f..0000000
--- a/include/toolcontext.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/commands/toolcontext.h
\ No newline at end of file
diff --git a/include/util.h b/include/util.h
deleted file mode 120000
index d9ca624..0000000
--- a/include/util.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/misc/util.h
\ No newline at end of file
diff --git a/include/uuid.h b/include/uuid.h
deleted file mode 120000
index 1b70f6e..0000000
--- a/include/uuid.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/uuid/uuid.h
\ No newline at end of file
diff --git a/include/vg.h b/include/vg.h
deleted file mode 120000
index 3f705b2..0000000
--- a/include/vg.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/metadata/vg.h
\ No newline at end of file
diff --git a/include/xlate.h b/include/xlate.h
deleted file mode 120000
index 4ab1c83..0000000
--- a/include/xlate.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/mm/xlate.h
\ No newline at end of file
diff --git a/make.tmpl.in b/make.tmpl.in
index 5c124b4..3a9f450 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -306,10 +306,12 @@ LIB_VERSION_DM := $(shell $(AWK) -F '.' '{printf "%s.%s",$$1,$$2}' $(top_srcdir)
LIB_VERSION_APP := $(shell $(AWK) -F '[(). ]' '{printf "%s.%s",$$1,$$4}' $(top_srcdir)/VERSION)
-INCLUDES += -I$(srcdir) -I$(top_srcdir)/include -I$(top_builddir)/include
+INCLUDES += -I$(srcdir) -I$(top_builddir)/include
+
+INC_LNS = $(top_builddir)/include/.symlinks_created
DEPS = $(top_builddir)/make.tmpl $(top_srcdir)/VERSION \
- $(top_builddir)/Makefile
+ $(top_builddir)/Makefile $(INC_LNS)
OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o)
POTFILES = $(SOURCES:%.c=%.pot)
@@ -504,9 +506,9 @@ $(LIB_STATIC): $(OBJECTS)
$(Q) $(RM) $@
$(Q) $(AR) rsv $@ $(OBJECTS) > /dev/null
-%.d: ;
+%.d: $(INC_LNS)
.PRECIOUS: %.d
-
+
%.mo: %.po
@echo " [MSGFMT] $<"
$(Q) $(MSGFMT) -o $@ $<
5 years, 11 months
master - tests: remove use of lvm1 metadatatype
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=39f05855c0f985a2095...
Commit: 39f05855c0f985a20951cd3394d97c166dd9af5d
Parent: d709d8445f206b67cfc06266ce7553f9cb6f3df5
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue May 1 13:28:10 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue May 1 13:29:57 2018 -0500
tests: remove use of lvm1 metadatatype
---
test/shell/vgcreate-usage.sh | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/test/shell/vgcreate-usage.sh b/test/shell/vgcreate-usage.sh
index 16117c3..ee7dd99 100644
--- a/test/shell/vgcreate-usage.sh
+++ b/test/shell/vgcreate-usage.sh
@@ -68,10 +68,6 @@ vgcreate $vg "$dev1" "$dev2"
not vgcreate $vg "$dev1" "$dev2"
vgremove -ff $vg
-#COMM 'vgcreate rejects MaxLogicalVolumes > 255'
-not vgcreate --metadatatype 1 --maxlogicalvolumes 1024 $vg "$dev1" "$dev2" 2>err
-grep "Number of volumes may not exceed 255" err
-
#COMM "vgcreate fails when the only pv has --metadatacopies 0"
not vgcreate $vg "$dev3"
5 years, 11 months
master - tests: remove gfs pool test
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d709d8445f206b67cfc...
Commit: d709d8445f206b67cfc06266ce7553f9cb6f3df5
Parent: 9687ee2a745d32ee4143759514e40c3f9fc7fbb6
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue May 1 13:25:40 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue May 1 13:25:40 2018 -0500
tests: remove gfs pool test
---
test/shell/pool-labels.sh | 48 ---------------------------------------------
1 files changed, 0 insertions(+), 48 deletions(-)
diff --git a/test/shell/pool-labels.sh b/test/shell/pool-labels.sh
deleted file mode 100644
index e7de6fc..0000000
--- a/test/shell/pool-labels.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions
-# of the GNU General Public License v.2.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-# lvmetad does not handle pool labels so skip test.
-SKIP_WITH_LVMLOCKD=1
-SKIP_WITH_LVMETAD=1
-SKIP_WITH_LVMPOLLD=1
-
-. lib/inittest
-
-env printf "" || skip # skip if printf is not available
-
-# create the old GFS pool labeled linear devices
-create_pool_label_()
-{
- # FIXME
- # echo -e is bashism, dash builtin sh doesn't do \xNN in printf either
- # printf comes from coreutils, and is probably not posix either
- env printf "\x01\x16\x70\x06\x5f\xcf\xff\xb9\xf8\x24\x8apool1" | dd of="$2" bs=5 seek=1 conv=notrunc
- env printf "\x04\x01\x03\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0$1\x68\x01\x16\x70\x00\x00\x00\x00\x00\x06\x5f\xd0" | dd of=$2 bs=273 seek=1 conv=notrunc
- aux notify_lvmetad "$2"
-}
-
-
-aux prepare_devs 2
-
-create_pool_label_ 0 "$dev1"
-create_pool_label_ 1 "$dev2"
-
-# check that pvcreate fails without -ff on the pool device
-not pvcreate "$dev1"
-
-# check that vgdisplay and pvcreate -ff works with the pool device
-vgdisplay --config 'global { locking_type = 0 }'
-aux disable_dev "$dev2"
-# FIXME! since pool1 cannot be opened, vgdisplay gives error... should we say
-# "not" there instead, checking that it indeed does fail?
-vgdisplay --config 'global { locking_type = 0 }' || true
-pvcreate -ff -y "$dev1"
5 years, 11 months
master - tests: update lvmetad-disabled to not use lvm1
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9687ee2a745d32ee414...
Commit: 9687ee2a745d32ee4143759514e40c3f9fc7fbb6
Parent: 8dcc973bbb2372edaac8f4df4d8480225c04cfe5
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue May 1 11:32:15 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue May 1 11:33:39 2018 -0500
tests: update lvmetad-disabled to not use lvm1
---
test/shell/lvmetad-disabled.sh | 24 +++++++++++++++++++-----
1 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/test/shell/lvmetad-disabled.sh b/test/shell/lvmetad-disabled.sh
index cba73d6..0f180c7 100644
--- a/test/shell/lvmetad-disabled.sh
+++ b/test/shell/lvmetad-disabled.sh
@@ -24,11 +24,13 @@ test ! -e "$LVM_LVMETAD_PIDFILE"
aux lvmconf "global/use_lvmetad = 0"
-pvcreate --metadatatype 1 "$dev1"
+pvcreate "$dev1"
pvcreate "$dev2"
-vgcreate -M1 $vg1 "$dev1"
+vgcreate $vg1 "$dev1"
vgcreate $vg2 "$dev2"
+lvcreate -n $lv1 -l1 $vg1
+
pvs 2>&1 | tee out
grep "$dev1" out
grep "$dev2" out
@@ -43,10 +45,21 @@ while ! test -e "$TESTDIR/lvmetad.socket"; do echo -n .; sleep .1; done # wait f
test -e "$LVM_LVMETAD_PIDFILE"
cp "$LVM_LVMETAD_PIDFILE" LOCAL_LVMETAD
-pvscan --cache 2>&1 | tee out
+pvscan --cache
+pvs 2>&1 | tee out
+grep "$dev1" out
+grep "$dev2" out
+not grep "WARNING: Not using lvmetad" out
+
+# We don't care about the repair, and we know it's
+# not valid on this lv. We are just running repair
+# because we know one side effect is to disable lvmetad.
+# FIXME: we should install lvmetactl so that we can
+# use that to directly disable lvmetad for tests like this.
+not lvconvert --repair $vg1/$lv1 2>&1 | tee out
grep "WARNING: Disabling lvmetad cache" out
-pvs 2>&1 | tee out
+pvs -vvvv 2>&1 | tee out
grep "$dev1" out
grep "$dev2" out
grep "WARNING: Not using lvmetad" out
@@ -56,7 +69,8 @@ grep $vg1 out
grep $vg2 out
grep "WARNING: Not using lvmetad" out
-vgremove $vg1 2>&1 | tee out
+vgchange -an $vg1
+vgremove -y $vg1 2>&1 | tee out
grep "WARNING: Not using lvmetad" out
pvremove "$dev1" 2>&1 | tee out
5 years, 11 months
master - bcache_write_bytes needs to be followed by flush
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8dcc973bbb2372edaac...
Commit: 8dcc973bbb2372edaac8f4df4d8480225c04cfe5
Parent: a418f88b76d6b67c58af6b8a7d75db29106ff0e1
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue May 1 09:33:55 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue May 1 09:33:55 2018 -0500
bcache_write_bytes needs to be followed by flush
The improved bcache_write_bytes is not flushing, so
the caller needs to do that.
---
lib/label/label.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/lib/label/label.c b/lib/label/label.c
index 97e2a0b..a981809 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -946,7 +946,14 @@ bool dev_write_bytes(struct device *dev, off_t start, size_t len, void *data)
}
if (!bcache_write_bytes(scan_bcache, dev->bcache_fd, start, len, data)) {
- log_error("dev_write_bytes %s at %u failed invalidate fd %d",
+ log_error("dev_write_bytes %s at %u bcache write failed invalidate fd %d",
+ dev_name(dev), (uint32_t)start, dev->bcache_fd);
+ label_scan_invalidate(dev);
+ return false;
+ }
+
+ if (!bcache_flush(scan_bcache)) {
+ log_error("dev_write_bytes %s at %u bcache flush failed invalidate fd %d",
dev_name(dev), (uint32_t)start, dev->bcache_fd);
label_scan_invalidate(dev);
return false;
@@ -982,7 +989,14 @@ bool dev_write_zeros(struct device *dev, off_t start, size_t len)
}
if (!bcache_write_zeros(scan_bcache, dev->bcache_fd, start, len)) {
- log_error("dev_write_zeros %s at %u failed invalidate fd %d",
+ log_error("dev_write_zeros %s at %u bcache write failed invalidate fd %d",
+ dev_name(dev), (uint32_t)start, dev->bcache_fd);
+ label_scan_invalidate(dev);
+ return false;
+ }
+
+ if (!bcache_flush(scan_bcache)) {
+ log_error("dev_write_zeros %s at %u bcache flush failed invalidate fd %d",
dev_name(dev), (uint32_t)start, dev->bcache_fd);
label_scan_invalidate(dev);
return false;
5 years, 11 months
master - lvmcache: fix typo in lvmcache_get_saved_vg
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a418f88b76d6b67c58a...
Commit: a418f88b76d6b67c58af6b8a7d75db29106ff0e1
Parent: 3ea862bdfc036f6e5ce08ba01eb706d1d10638cd
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue May 1 09:06:04 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue May 1 09:06:57 2018 -0500
lvmcache: fix typo in lvmcache_get_saved_vg
---
lib/cache/lvmcache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 8ba8b3c..9023bcc 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -359,7 +359,7 @@ struct volume_group *lvmcache_get_saved_vg(const char *vgid, int precommitted)
* By just dropping old, we force a subsequent request for old to
* reread it rather than just using new. */
- if (vginfo->saved_vg_old && (vginfo->saved_vg_old < vg->seqno)) {
+ 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);
}
5 years, 11 months
master - unit-test/bcache_t: test was using too large a block size
by Joe Thornber
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3ea862bdfc036f6e5ce...
Commit: 3ea862bdfc036f6e5ce08ba01eb706d1d10638cd
Parent: bfc61a9543f3fc669d265d9b6e384cef0ab78ef2
Author: Joe Thornber <ejt(a)redhat.com>
AuthorDate: Tue May 1 14:17:12 2018 +0100
Committer: Joe Thornber <ejt(a)redhat.com>
CommitterDate: Tue May 1 14:17:12 2018 +0100
unit-test/bcache_t: test was using too large a block size
---
test/unit/bcache_t.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/unit/bcache_t.c b/test/unit/bcache_t.c
index bb1db29..b0e2dd2 100644
--- a/test/unit/bcache_t.c
+++ b/test/unit/bcache_t.c
@@ -412,7 +412,7 @@ static void test_block_size_must_be_multiple_of_page_size(void *fixture)
for (i = 0; i < DM_ARRAY_SIZE(_bad_examples); i++)
bad_create(_bad_examples[i], 16);
- for (i = 1; i < 1000; i++)
+ for (i = 1; i < 100; i++)
good_create(i * 8, 16);
}
5 years, 11 months