master - configure.ac: bad configure generated due to stray ;;
by Joe Thornber
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b393fbec00bbe1fb8d5...
Commit: b393fbec00bbe1fb8d546ee3f360f8d2eb19540e
Parent: 2bb02e24bf9bd8467e75ba6e644daab3de2b4c77
Author: Joe Thornber <ejt(a)redhat.com>
AuthorDate: Thu May 3 15:38:05 2018 +0100
Committer: Joe Thornber <ejt(a)redhat.com>
CommitterDate: Thu May 3 15:38:05 2018 +0100
configure.ac: bad configure generated due to stray ;;
---
configure | 30 +++---------------------------
configure.ac | 2 +-
2 files changed, 4 insertions(+), 28 deletions(-)
diff --git a/configure b/configure
index 6400e82..e874932 100755
--- a/configure
+++ b/configure
@@ -663,7 +663,6 @@ SBINDIR
REPLICATORS
READLINE_LIBS
RT_LIBS
-RAID
PYTHON3DIR
PYTHON2DIR
PYTHON3_LIBDIRS
@@ -912,7 +911,6 @@ with_default_name_mangling
with_cluster
with_snapshots
with_mirrors
-with_raid
with_default_mirror_segtype
with_default_raid10_segtype
with_default_sparse_segtype
@@ -1745,7 +1743,6 @@ Optional Packages:
[internal]
--with-snapshots=TYPE snapshot support: internal/shared/none [internal]
--with-mirrors=TYPE mirror support: internal/shared/none [internal]
- --with-raid=TYPE raid support: internal/shared/none [internal]
--with-default-mirror-segtype=TYPE
default mirror segtype: raid1/mirror [raid1]
--with-default-raid10-segtype=TYPE
@@ -8439,19 +8436,6 @@ $as_echo "#define MIRRORED_INTERNAL 1" >>confdefs.h
esac
################################################################################
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include raid" >&5
-$as_echo_n "checking whether to include raid... " >&6; }
-
-# Check whether --with-raid was given.
-if test "${with_raid+set}" = set; then :
- withval=$with_raid; RAID=$withval
-else
- RAID=internal
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAID" >&5
-$as_echo "$RAID" >&6; }
-
# Check whether --with-default-mirror-segtype was given.
if test "${with_default_mirror_segtype+set}" = set; then :
@@ -8468,15 +8452,10 @@ else
DEFAULT_RAID10_SEGTYPE="raid10"
fi
-case "$RAID" in
- none) test "$DEFAULT_MIRROR_SEGTYPE" = "raid1" && DEFAULT_MIRROR_SEGTYPE="mirror"
- test "$DEFAULT_RAID10_SEGTYPE" = "raid10" && DEFAULT_RAID10_SEGTYPE="mirror" ;;
- shared) ;;
- internal)
+
+
$as_echo "#define RAID_INTERNAL 1" >>confdefs.h
- ;;
- *) as_fn_error $? "--with-raid parameter invalid" "$LINENO" 5 ;;
-esac
+
cat >>confdefs.h <<_ACEOF
@@ -13883,8 +13862,6 @@ fi
################################################################################
if [ \( "$LVM1" = shared -o "$POOL" = shared -o "$CLUSTER" = shared \
- -o "$SNAPSHOTS" = shared -o "$MIRRORS" = shared \
- -o "$RAID" = shared -o "$CACHE" = shared \
\) -a "$STATIC_LINK" = yes ]; then
as_fn_error $? "Features cannot be 'shared' when building statically" "$LINENO" 5
fi
@@ -15581,7 +15558,6 @@ _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/.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"
diff --git a/configure.ac b/configure.ac
index 6df883b..5738b05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -342,7 +342,7 @@ AC_ARG_WITH(default-raid10-segtype,
DEFAULT_RAID10_SEGTYPE=$withval, DEFAULT_RAID10_SEGTYPE="raid10")
AC_DEFINE([RAID_INTERNAL], 1,
- [Define to 1 to include built-in support for raid.]) ;;
+ [Define to 1 to include built-in support for raid.])
AC_DEFINE_UNQUOTED([DEFAULT_MIRROR_SEGTYPE], ["$DEFAULT_MIRROR_SEGTYPE"],
[Default segtype used for mirror volumes.])
6 years
master - functional tests: Update have_raid function
by Joe Thornber
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=52656c89fd6e7655b05...
Commit: 52656c89fd6e7655b0599e20f90cc9d70561f1fb
Parent: 9cab0057971eea27f31c8e3b2a83d69337d0155d
Author: Joe Thornber <ejt(a)redhat.com>
AuthorDate: Thu May 3 14:22:24 2018 +0100
Committer: Joe Thornber <ejt(a)redhat.com>
CommitterDate: Thu May 3 14:22:24 2018 +0100
functional tests: Update have_raid function
No need to check if it's built in.
---
test/lib/aux.sh | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index e44116f..2984af3 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -1492,10 +1492,6 @@ have_thin() {
}
have_raid() {
- test "$RAID" = shared -o "$RAID" = internal || {
- echo "Raid is not built-in." >&2
- return 1;
- }
target_at_least dm-raid "$@"
# some kernels have broken mdraid bitmaps, don't use them!
6 years
master - configure.ac: Remove some more remnants of optional RAID
by Joe Thornber
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9cab0057971eea27f31...
Commit: 9cab0057971eea27f31c8e3b2a83d69337d0155d
Parent: 90d0ff66362f3f21f79b5204bcc072c12185883b
Author: Joe Thornber <ejt(a)redhat.com>
AuthorDate: Thu May 3 14:21:21 2018 +0100
Committer: Joe Thornber <ejt(a)redhat.com>
CommitterDate: Thu May 3 14:21:21 2018 +0100
configure.ac: Remove some more remnants of optional RAID
(It's now always 'internal')
---
configure.ac | 21 +++------------------
1 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index dc01a8e..6df883b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -332,13 +332,6 @@ esac
################################################################################
dnl -- raid inclusion type
-AC_MSG_CHECKING(whether to include raid)
-AC_ARG_WITH(raid,
- AC_HELP_STRING([--with-raid=TYPE],
- [raid support: internal/shared/none [internal]]),
- RAID=$withval, RAID=internal)
-AC_MSG_RESULT($RAID)
-
AC_ARG_WITH(default-mirror-segtype,
AC_HELP_STRING([--with-default-mirror-segtype=TYPE],
[default mirror segtype: raid1/mirror [raid1]]),
@@ -347,14 +340,9 @@ AC_ARG_WITH(default-raid10-segtype,
AC_HELP_STRING([--with-default-raid10-segtype=TYPE],
[default mirror segtype: raid10/mirror [raid10]]),
DEFAULT_RAID10_SEGTYPE=$withval, DEFAULT_RAID10_SEGTYPE="raid10")
-case "$RAID" in
- none) test "$DEFAULT_MIRROR_SEGTYPE" = "raid1" && DEFAULT_MIRROR_SEGTYPE="mirror"
- test "$DEFAULT_RAID10_SEGTYPE" = "raid10" && DEFAULT_RAID10_SEGTYPE="mirror" ;;
- shared) ;;
- internal) AC_DEFINE([RAID_INTERNAL], 1,
- [Define to 1 to include built-in support for raid.]) ;;
- *) AC_MSG_ERROR([--with-raid parameter invalid]) ;;
-esac
+
+AC_DEFINE([RAID_INTERNAL], 1,
+ [Define to 1 to include built-in support for raid.]) ;;
AC_DEFINE_UNQUOTED([DEFAULT_MIRROR_SEGTYPE], ["$DEFAULT_MIRROR_SEGTYPE"],
[Default segtype used for mirror volumes.])
@@ -1551,8 +1539,6 @@ AC_CHECK_LIB(dl, dlopen,
################################################################################
dnl -- Check for shared/static conflicts
if [[ \( "$LVM1" = shared -o "$POOL" = shared -o "$CLUSTER" = shared \
- -o "$SNAPSHOTS" = shared -o "$MIRRORS" = shared \
- -o "$RAID" = shared -o "$CACHE" = shared \
\) -a "$STATIC_LINK" = yes ]]; then
AC_MSG_ERROR([Features cannot be 'shared' when building statically])
fi
@@ -2042,7 +2028,6 @@ AC_SUBST(PYTHON2DIR)
AC_SUBST(PYTHON3DIR)
AC_SUBST(QUORUM_CFLAGS)
AC_SUBST(QUORUM_LIBS)
-AC_SUBST(RAID)
AC_SUBST(RT_LIBS)
AC_SUBST(READLINE_LIBS)
AC_SUBST(REPLICATORS)
6 years
master - filters: increase MAX_FILTERS for new filter
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=977d0a361301d9383a2...
Commit: 977d0a361301d9383a25291fe8cfdd6cea93e22d
Parent: 90d0ff66362f3f21f79b5204bcc072c12185883b
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed May 2 14:10:30 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed May 2 14:10:30 2018 -0500
filters: increase MAX_FILTERS for new filter
The new signature filter was added without increasing this.
---
lib/commands/toolcontext.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 7f74c7e..76e15e0 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -1053,7 +1053,7 @@ static int _init_dev_cache(struct cmd_context *cmd)
return 1;
}
-#define MAX_FILTERS 9
+#define MAX_FILTERS 10
static struct dev_filter *_init_lvmetad_filter_chain(struct cmd_context *cmd)
{
6 years
master - bcache: reorder includes in .c file too
by Joe Thornber
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=90d0ff66362f3f21f79...
Commit: 90d0ff66362f3f21f79b5204bcc072c12185883b
Parent: 8fd300f7df2c9f3a170dbf335d0ab242249c0627
Author: Joe Thornber <ejt(a)redhat.com>
AuthorDate: Wed May 2 19:45:06 2018 +0100
Committer: Joe Thornber <ejt(a)redhat.com>
CommitterDate: Wed May 2 19:45:06 2018 +0100
bcache: reorder includes in .c file too
---
lib/device/bcache.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/device/bcache.c b/lib/device/bcache.c
index 68d2e53..742b7ee 100644
--- a/lib/device/bcache.c
+++ b/lib/device/bcache.c
@@ -14,6 +14,10 @@
#define _GNU_SOURCE
+#include "bcache.h"
+#include "dm-logging.h"
+#include "log.h"
+
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
@@ -28,10 +32,6 @@
#include <sys/ioctl.h>
#include <sys/user.h>
-#include "bcache.h"
-#include "dm-logging.h"
-#include "log.h"
-
#define SECTOR_SHIFT 9L
//----------------------------------------------------------------
6 years
master - device/bcache: reorder includes
by Joe Thornber
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8fd300f7df2c9f3a170...
Commit: 8fd300f7df2c9f3a170dbf335d0ab242249c0627
Parent: 972b535220d2d9f4df583bcc5e67e8cc14ca6294
Author: Joe Thornber <ejt(a)redhat.com>
AuthorDate: Wed May 2 18:59:43 2018 +0100
Committer: Joe Thornber <ejt(a)redhat.com>
CommitterDate: Wed May 2 18:59:43 2018 +0100
device/bcache: reorder includes
---
lib/device/bcache.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/device/bcache.h b/lib/device/bcache.h
index a72b83b..2b0d965 100644
--- a/lib/device/bcache.h
+++ b/lib/device/bcache.h
@@ -15,12 +15,12 @@
#ifndef BCACHE_H
#define BCACHE_H
+#include "libdevmapper.h"
+
#include <linux/fs.h>
#include <stdint.h>
#include <stdbool.h>
-#include "libdevmapper.h"
-
/*----------------------------------------------------------------*/
// FIXME: move somewhere more sensible
6 years
master - build: add -D_FILE_OFFSET_BITS=64
by Joe Thornber
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=972b535220d2d9f4df5...
Commit: 972b535220d2d9f4df583bcc5e67e8cc14ca6294
Parent: 9fe0be871c916c1105212f916d8c6904d12ea5b4
Author: Joe Thornber <ejt(a)redhat.com>
AuthorDate: Wed May 2 18:40:38 2018 +0100
Committer: Joe Thornber <ejt(a)redhat.com>
CommitterDate: Wed May 2 18:40:38 2018 +0100
build: add -D_FILE_OFFSET_BITS=64
I don't like having this in a common header because it means you end
up including too much and causing unneccessary dependencies. eg,
lib/misc/lib.h includes libdevmapper.h, internationalisation, and
logging stuff.
---
daemons/cmirrord/logging.h | 1 -
lib/misc/lib.h | 1 -
make.tmpl.in | 3 +++
tools/tool.h | 1 -
4 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/daemons/cmirrord/logging.h b/daemons/cmirrord/logging.h
index 3ede0c7..13e6b39 100644
--- a/daemons/cmirrord/logging.h
+++ b/daemons/cmirrord/logging.h
@@ -14,7 +14,6 @@
#define _LVM_CLOG_LOGGING_H
#define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
#include "configure.h"
#include <stdio.h>
diff --git a/lib/misc/lib.h b/lib/misc/lib.h
index 8ed06f8..d7fa5c7 100644
--- a/lib/misc/lib.h
+++ b/lib/misc/lib.h
@@ -23,7 +23,6 @@
#define _REENTRANT
#define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
/*
* Symbol export control macros
diff --git a/make.tmpl.in b/make.tmpl.in
index 3a9f450..d3a80ef 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -444,6 +444,9 @@ endif
DEPFLAGS=-MT $@ -MMD -MP -MF $*.d
+# still needed in 2018 for 32bit builds
+DEFS+=-D_FILE_OFFSET_BITS=64
+
%.o: %.c
@echo " [CC] $<"
$(Q) $(CC) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
diff --git a/tools/tool.h b/tools/tool.h
index 79b30bc..a2c8572 100644
--- a/tools/tool.h
+++ b/tools/tool.h
@@ -19,7 +19,6 @@
#define _LVM_TOOL_H
#define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
#include "configure.h"
6 years
master - unit-test/matcher_t: Fixup Kabi's test
by Joe Thornber
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9fe0be871c916c11052...
Commit: 9fe0be871c916c1105212f916d8c6904d12ea5b4
Parent: 506ab29bfd8ec5721cdabb0745ae29af739b47a4
Author: Joe Thornber <ejt(a)redhat.com>
AuthorDate: Wed May 2 13:53:43 2018 +0100
Committer: Joe Thornber <ejt(a)redhat.com>
CommitterDate: Wed May 2 13:53:43 2018 +0100
unit-test/matcher_t: Fixup Kabi's test
The matcher matches the regexes in reverse order.
---
test/unit/matcher_t.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/test/unit/matcher_t.c b/test/unit/matcher_t.c
index b5bf1cf..31109d2 100644
--- a/test/unit/matcher_t.c
+++ b/test/unit/matcher_t.c
@@ -74,18 +74,20 @@ static void test_matching(void *fixture)
static void test_kabi_query(void *fixture)
{
+ // Remember, matches regexes from last to first.
static const char *_patterns[] = {
- "loop", "/dev/md.*", ".*"
+ ".*", ".*/dev/md.*", "loop"
};
static struct {
const char *input;
int r;
} _cases[] = {
- {"foo", 2},
- {"/dev/mapper/vg-lvol1", 2},
- {"/dev/mapper/vglvol1", 2},
- {"loop", 0},
+ {"foo", 0},
+ {"/dev/mapper/vg-lvol1", 0},
+ {"/dev/mapper/vglvol1", 0},
+ {"/dev/md1", 1},
+ {"loop", 2},
};
int r;
6 years
master - unit-test/matcher_t: add another (failing!) test for Kabi
by Joe Thornber
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=506ab29bfd8ec5721cd...
Commit: 506ab29bfd8ec5721cdabb0745ae29af739b47a4
Parent: 11436b00e0fa4a54ce504beba72b23bbf0682b27
Author: Joe Thornber <ejt(a)redhat.com>
AuthorDate: Wed May 2 13:31:57 2018 +0100
Committer: Joe Thornber <ejt(a)redhat.com>
CommitterDate: Wed May 2 13:31:57 2018 +0100
unit-test/matcher_t: add another (failing!) test for Kabi
---
test/unit/matcher_t.c | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/test/unit/matcher_t.c b/test/unit/matcher_t.c
index a5eb5f9..b5bf1cf 100644
--- a/test/unit/matcher_t.c
+++ b/test/unit/matcher_t.c
@@ -72,6 +72,43 @@ static void test_matching(void *fixture)
T_ASSERT_EQUAL(dm_regex_match(scanner, nonprint[i].str), nonprint[i].expected - 1);
}
+static void test_kabi_query(void *fixture)
+{
+ static const char *_patterns[] = {
+ "loop", "/dev/md.*", ".*"
+ };
+
+ static struct {
+ const char *input;
+ int r;
+ } _cases[] = {
+ {"foo", 2},
+ {"/dev/mapper/vg-lvol1", 2},
+ {"/dev/mapper/vglvol1", 2},
+ {"loop", 0},
+ };
+
+ int r;
+ unsigned i;
+ struct dm_pool *mem = fixture;
+ struct dm_regex *scanner;
+
+ scanner = dm_regex_create(mem, _patterns, DM_ARRAY_SIZE(_patterns));
+ T_ASSERT(scanner != NULL);
+
+ for (i = 0; i < DM_ARRAY_SIZE(_cases); i++) {
+ r = dm_regex_match(scanner, _cases[i].input);
+ if (r != _cases[i].r) {
+ test_fail("'%s' expected to match '%s', but matched %s",
+ _cases[i].input,
+ _cases[i].r >= DM_ARRAY_SIZE(_patterns) ? "<nothing>" : _patterns[_cases[i].r],
+ r >= DM_ARRAY_SIZE(_patterns) ? "<nothing>" : _patterns[r]);
+ }
+ }
+
+
+}
+
#define T(path, desc, fn) register_test(ts, "/base/regex/" path, desc, fn)
void regex_tests(struct dm_list *all_tests)
@@ -84,6 +121,7 @@ void regex_tests(struct dm_list *all_tests)
T("fingerprints", "not sure", test_fingerprints);
T("matching", "test the matcher with a variety of regexes", test_matching);
+ T("kabi-query", "test the matcher with some specific patterns", test_kabi_query);
dm_list_add(all_tests, &ts->list);
}
6 years