master - pre-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b9391b1b9f0b73303fa...
Commit: b9391b1b9f0b73303fa21f8f92574d17ce4c2b02
Parent: 23cc7ddc50e2800a6dc248de897a4c88c1514160
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Oct 23 09:46:23 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Oct 23 09:51:55 2019 +0200
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 6 +++---
WHATS_NEW_DM | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/VERSION b/VERSION
index 705514f..faf0a28 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.03.06(2)-git (2019-06-15)
+2.03.06(2) (2019-10-23)
diff --git a/VERSION_DM b/VERSION_DM
index 4f5679d..92988a6 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.165-git (2019-06-15)
+1.02.165 (2019-10-23)
diff --git a/WHATS_NEW b/WHATS_NEW
index 11b0acf..b72f172 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,5 @@
-Version 2.03.06 -
-================================
+Version 2.03.06 - 23rd October 2019
+===================================
Add _cpool suffix to cache-pool LV name when used by caching LV.
No longer store extra UUID for cmeta and cdata cachevol layer.
Enhance activation of cache devices with cachevols.
@@ -7,7 +7,7 @@ Version 2.03.06 -
Rename LV converted to cachevol to use _cvol suffix.
Use normal LVs for wiping of cachevols.
Reload cleanered cache DM only with cleaner policy.
- Fix cmd return when zering of cachevol fails.
+ Fix cmd return when zeroing of cachevol fails.
Extend lvs to show all VDO properties.
Preserve VDO write policy with vdopool.
Increase default vdo bio threads to 4.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index ed56b89..d164d63 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,5 @@
-Version 1.02.165 -
-=================================
+Version 1.02.165 - 23rd October 2019
+====================================
Add support for DM_DEVICE_GET_TARGET_VERSION.
Add debug of dmsetup udevcomplete with hexa print DM_COOKIE_COMPLETED.
Fix versioning of dm_stats_create_region and dm_stats_create_region.
4 years, 7 months
master - build: make generate
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3e3c78a6b0285448ca1...
Commit: 3e3c78a6b0285448ca1f96567bc25d8013e97b45
Parent: 570676488516b60ea3132b5010e7aef5d5cb1549
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Oct 23 09:51:07 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Oct 23 09:51:07 2019 +0200
build: make generate
---
conf/example.conf.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 91ce5be..05b0857 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -621,7 +621,7 @@ allocation {
# Each additional thread after the first will use an additional 18MiB of RAM,
# plus 1.12 MiB of RAM per megabyte of configured read cache size.
# This configuration option has an automatic default value.
- # vdo_bio_threads = 1
+ # vdo_bio_threads = 4
# Configuration option allocation/vdo_bio_rotation.
# Specifies the number of I/O operations to enqueue for each bio-submission
4 years, 7 months
master - cov: Fix memory leak
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=23cc7ddc50e2800a6dc...
Commit: 23cc7ddc50e2800a6dc248de897a4c88c1514160
Parent: 3e3c78a6b0285448ca1f96567bc25d8013e97b45
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Aug 28 10:45:04 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Oct 23 09:51:55 2019 +0200
cov: Fix memory leak
---
libdm/libdm-common.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index d17c284..d75c704 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -2011,7 +2011,8 @@ static int _sysfs_get_kernel_name(uint32_t major, uint32_t minor, char *buf, siz
log_sys_error("readlink", sysfs_path);
else {
log_sys_debug("readlink", sysfs_path);
- return _sysfs_find_kernel_name(major, minor, buf, buf_size);
+ r = _sysfs_find_kernel_name(major, minor, buf, buf_size);
+ goto out;
}
goto bad;
}
@@ -2032,6 +2033,7 @@ static int _sysfs_get_kernel_name(uint32_t major, uint32_t minor, char *buf, siz
strcpy(buf, name);
r = 1;
bad:
+out:
dm_free(temp_buf);
dm_free(sysfs_path);
4 years, 7 months
master - improve command definition matching using type
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=570676488516b60ea31...
Commit: 570676488516b60ea3132b5010e7aef5d5cb1549
Parent: 80ae7206a80277f3e01ba92725c209ea82a0bde6
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Oct 21 16:42:06 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Oct 22 09:35:10 2019 -0500
improve command definition matching using type
When a user includes "--type foo" in a command, only
look at command definitions with matching type, as
opposed to using matching/mismatching --type as a
vote for/against a given command def. This means a
command with --type foo will prioritize a command def
with --type foo over other command defs that have
more matching options but an unmatching type. This
makes it more likely that a closely matching command
def will be recommended.
---
tools/lvmcmdline.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 73 insertions(+), 0 deletions(-)
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 7d29b6f..860e6de 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -1520,6 +1520,65 @@ static int _command_required_pos_matches(struct cmd_context *cmd, int ci, int rp
}
/*
+ * Return 1 if we should skip this command from consideration.
+ * This would happen if the command does not include a --type
+ * option that does not match type_arg.
+ */
+
+static int _command_skip_for_type_arg(struct cmd_context *cmd, int ci, const char *type_arg)
+{
+ int ro, oo, opt_enum;
+
+ for (ro = 0; ro < (commands[ci].ro_count + commands[ci].any_ro_count); ro++) {
+ opt_enum = commands[ci].required_opt_args[ro].opt;
+
+ if (opt_enum != type_ARG)
+ continue;
+
+ /* SegType keyword in command def matches any type_arg */
+ if (val_bit_is_set(commands[ci].required_opt_args[ro].def.val_bits, segtype_VAL))
+ return 0;
+
+ if (!commands[ci].required_opt_args[ro].def.str)
+ return 0;
+
+ if (!strcmp(commands[ci].required_opt_args[ro].def.str, type_arg))
+ return 0;
+
+ if (!strncmp(commands[ci].required_opt_args[ro].def.str, "raid", 4) &&
+ !strncmp(type_arg, "raid", 4))
+ return 0;
+
+ return 1;
+ }
+
+ for (oo = 0; oo < commands[ci].oo_count; oo++) {
+ opt_enum = commands[ci].optional_opt_args[oo].opt;
+
+ if (opt_enum != type_ARG)
+ continue;
+
+ /* SegType keyword in command def matches any type_arg */
+ if (val_bit_is_set(commands[ci].optional_opt_args[oo].def.val_bits, segtype_VAL))
+ return 0;
+
+ if (!commands[ci].optional_opt_args[oo].def.str)
+ return 0;
+
+ if (!strcmp(commands[ci].optional_opt_args[oo].def.str, type_arg))
+ return 0;
+
+ if (!strncmp(commands[ci].optional_opt_args[oo].def.str, "raid", 4) &&
+ !strncmp(type_arg, "raid", 4))
+ return 0;
+
+ return 1;
+ }
+
+ return 1;
+}
+
+/*
* Match what the user typed with a one specific command definition/prototype
* from commands[]. If nothing matches, it's not a valid command. The match
* is based on command name, required opt args and required pos args.
@@ -1549,6 +1608,7 @@ static int _command_required_pos_matches(struct cmd_context *cmd, int ci, int rp
static struct command *_find_command(struct cmd_context *cmd, const char *path, int *argc, char **argv)
{
const char *name;
+ const char *type_arg = NULL;
char opts_msg[MAX_OPTS_MSG];
char check_opts_msg[MAX_OPTS_MSG];
int match_required, match_ro, match_rp, match_any_ro, match_type, match_unused, mismatch_required;
@@ -1575,6 +1635,9 @@ static struct command *_find_command(struct cmd_context *cmd, const char *path,
variants++;
}
+ if (arg_is_set(cmd, type_ARG))
+ type_arg = arg_str_value(cmd, type_ARG, "");
+
for (i = 0; i < COMMAND_COUNT; i++) {
if (strcmp(name, commands[i].name))
continue;
@@ -1597,6 +1660,16 @@ static struct command *_find_command(struct cmd_context *cmd, const char *path,
continue;
}
+ /*
+ * '--type foo' is special. If the user has set --type foo, then
+ * we will only look at command defs that include the same --type foo
+ * (as required or optional). We'll never match some command based
+ * on *other* (non-type) options, and then at the end complain that
+ * the user's --type is not accepted.
+ */
+ if (type_arg && _command_skip_for_type_arg(cmd, i, type_arg))
+ continue;
+
match_required = 0; /* required parameters that match */
match_ro = 0; /* required opt_args that match */
match_rp = 0; /* required pos_args that match */
4 years, 7 months
master - cache: _cpool is protected suffix now
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=80ae7206a80277f3e01...
Commit: 80ae7206a80277f3e01ba92725c209ea82a0bde6
Parent: b4e87e638ea2fc1c0f8ebca01496f4c34dbd80d0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Oct 22 16:07:21 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Oct 22 16:07:21 2019 +0200
cache: _cpool is protected suffix now
---
lib/misc/lvm-string.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/misc/lvm-string.c b/lib/misc/lvm-string.c
index d96d431..0ee3403 100644
--- a/lib/misc/lvm-string.c
+++ b/lib/misc/lvm-string.c
@@ -157,6 +157,7 @@ static const char *_lvname_has_reserved_component_string(const char *lvname)
"_cdata",
"_cmeta",
"_corig",
+ "_cpool",
"_cvol",
"_wcorig",
"_mimage",
4 years, 7 months
master - tests: enable with 6.2.1
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b4e87e638ea2fc1c0f8...
Commit: b4e87e638ea2fc1c0f8ebca01496f4c34dbd80d0
Parent: 3e01ff2783505f9b64f273fb492ee88e26afb568
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Oct 22 16:06:19 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Oct 22 16:06:19 2019 +0200
tests: enable with 6.2.1
Package vdo-6.2.2.18 goes with kvdo version 6.2.1
Hopefully will get fixed soon.
Meanwhile to get test coverage...
---
test/shell/lvcreate-vdo-cache.sh | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/shell/lvcreate-vdo-cache.sh b/test/shell/lvcreate-vdo-cache.sh
index a104a16..b502986 100644
--- a/test/shell/lvcreate-vdo-cache.sh
+++ b/test/shell/lvcreate-vdo-cache.sh
@@ -22,9 +22,9 @@ SKIP_WITH_LVMPOLLD=1
#
#
-# FIXME: tempororarily disable this test until fixed VDO driver is relase
-#
-aux have_vdo 96 2 0 || skip
+# FIXME: tempororarily disable this test until fixed VDO driver is relased
+# should really be 6.2.2 - currently goes with vdo-6.2.2.18
+aux have_vdo 6 2 1 || skip
aux have_cache 1 3 0 || skip
which mkfs.ext4 || skip
4 years, 7 months
master - dm: fix compilation of dmsetup
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3e01ff2783505f9b64f...
Commit: 3e01ff2783505f9b64f273fb492ee88e26afb568
Parent: 65efacd0e077f61842cf3bf9ff1fc42230e08947
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Mon Oct 21 16:31:53 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Oct 22 13:39:45 2019 +0200
dm: fix compilation of dmsetup
Fix: 889c88e9dab33195efc4dc0400a4b0aaa3383948
Use correct enum DM_DEVICE_GET_TARGET_VERSION.
---
WHATS_NEW | 2 +-
WHATS_NEW_DM | 2 +-
device_mapper/all.h | 2 +-
libdm/dm-tools/dmsetup.c | 2 +-
libdm/libdevmapper.h | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 001a12b..11b0acf 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -12,7 +12,7 @@ Version 2.03.06 -
Preserve VDO write policy with vdopool.
Increase default vdo bio threads to 4.
Continue report when cache_status fails.
- Add support for DM_GET_TARGET_VERSION into device_mapper.
+ Add support for DM_DEVICE_GET_TARGET_VERSION into device_mapper.
Fix cmirrord usage of header files from device_mapper subdir.
Allow standalone activation of VDO pool just like for thin-pools.
Activate thin-pool layered volume as 'read-only' device.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 94492d4..ed56b89 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,6 +1,6 @@
Version 1.02.165 -
=================================
- Add support for DM_GET_TARGET_VERSION.
+ Add support for DM_DEVICE_GET_TARGET_VERSION.
Add debug of dmsetup udevcomplete with hexa print DM_COOKIE_COMPLETED.
Fix versioning of dm_stats_create_region and dm_stats_create_region.
diff --git a/device_mapper/all.h b/device_mapper/all.h
index 52b546f..57673b4 100644
--- a/device_mapper/all.h
+++ b/device_mapper/all.h
@@ -123,7 +123,7 @@ enum {
DM_DEVICE_ARM_POLL,
- DM_GET_TARGET_VERSION
+ DM_DEVICE_GET_TARGET_VERSION
};
/*
diff --git a/libdm/dm-tools/dmsetup.c b/libdm/dm-tools/dmsetup.c
index 7d60d2f..269f86c 100644
--- a/libdm/dm-tools/dmsetup.c
+++ b/libdm/dm-tools/dmsetup.c
@@ -2596,7 +2596,7 @@ static int _target_version(CMD_ARGS)
struct dm_task *dmt;
struct dm_versions *target;
- if (!(dmt = dm_task_create(DM_GET_TARGET_VERSION)))
+ if (!(dmt = dm_task_create(DM_DEVICE_GET_TARGET_VERSION)))
return_0;
if (!dm_task_set_name(dmt, argv[0]))
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 81c67dc..18fe9f9 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -123,7 +123,7 @@ enum {
DM_DEVICE_ARM_POLL,
- DM_GET_TARGET_VERSION
+ DM_DEVICE_GET_TARGET_VERSION
};
/*
4 years, 7 months
master - tests: more suffixes
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=65efacd0e077f61842c...
Commit: 65efacd0e077f61842cf3bf9ff1fc42230e08947
Parent: a7563dc6a1f8b46e13c6cf1a7fbeeb611310b29a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Oct 22 13:31:23 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Oct 22 13:39:39 2019 +0200
tests: more suffixes
---
test/shell/lvcreate-usage.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvcreate-usage.sh b/test/shell/lvcreate-usage.sh
index ca8694e..b1cd515 100644
--- a/test/shell/lvcreate-usage.sh
+++ b/test/shell/lvcreate-usage.sh
@@ -221,7 +221,7 @@ lvremove -f $vg
for i in pvmove snapshot ; do
invalid lvcreate -l1 -n ${i}1 $vg
done
-for i in _cdata _cmeta _mimage _mlog _pmspare _tdata _tmeta _vorigin ; do
+for i in _cdata _cmeta _cpool _cvol _mimage _mlog _pmspare _tdata _tmeta _vorigin ; do
invalid lvcreate -l1 -n s_${i}_1 $vg
done
4 years, 7 months
master - gcc: older version can't see udev is always set
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a7563dc6a1f8b46e13c...
Commit: a7563dc6a1f8b46e13c6cf1a7fbeeb611310b29a
Parent: 967e2decd22cee4aa4426cfda5732860e1a085b3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Oct 22 10:43:11 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Oct 22 13:39:22 2019 +0200
gcc: older version can't see udev is always set
---
lib/device/dev-cache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c
index a15e239..3dcfc10 100644
--- a/lib/device/dev-cache.c
+++ b/lib/device/dev-cache.c
@@ -1087,7 +1087,7 @@ out:
static void _insert_dirs(struct dm_list *dirs)
{
struct dir_list *dl;
- struct udev *udev;
+ struct udev *udev = NULL;
int with_udev;
with_udev = obtain_device_list_from_udev() &&
4 years, 7 months
stable-2.02 - dm: Fix compilation of dmsetup
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c65f3fd8dfaae6efd85...
Commit: c65f3fd8dfaae6efd8529a846c6f2a9f604c440d
Parent: c24fa7b7b714871950e0366ca4c35d0e601786ff
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Mon Oct 21 16:31:53 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Oct 22 10:37:40 2019 +0200
dm: Fix compilation of dmsetup
Fix: 889c88e9dab33195efc4dc0400a4b0aaa3383948
---
libdm/libdevmapper.h | 2 +-
tools/dmsetup.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 81c67dc..18fe9f9 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -123,7 +123,7 @@ enum {
DM_DEVICE_ARM_POLL,
- DM_GET_TARGET_VERSION
+ DM_DEVICE_GET_TARGET_VERSION
};
/*
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index dfa9e34..b5419ca 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -2595,7 +2595,7 @@ static int _target_version(CMD_ARGS)
struct dm_task *dmt;
struct dm_versions *target;
- if (!(dmt = dm_task_create(DM_GET_TARGET_VERSION)))
+ if (!(dmt = dm_task_create(DM_DEVICE_GET_TARGET_VERSION)))
return_0;
if (!dm_task_set_name(dmt, argv[0]))
4 years, 7 months