master - macros: fix default symbol export control
by Bryn Reeves
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=82a27a85b54b68...
Commit: 82a27a85b54b68277e79de2fa9b4fadb01330497
Parent: ba898b9ab6f02153eb3fa44d1e893f6b49424652
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Fri Aug 21 21:15:10 2015 +0100
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Mon Aug 24 20:03:21 2015 +0100
macros: fix default symbol export control
Fix the version export macros to make it possible to export two
different DM_* versions of a symbol: currently it is only possible for a
DM_* symbol to override a symbol in Base. Attempting to export two
symbols at different DM_* version levels (e.g. DM_1_02_104 and
DM_1_02_106) leads to a linker error due to a duplicate symbol
definition.
This is because the DM_EXPORTED_SYMBOL macro makes each exported symbol
the default (@@VERSION):
__asm__(".symver " #func "_v" #ver ", " #func "@@DM_" #ver )
Fix the macro to use a single '@' for a symbols exported in multiple
versions and rename the macros to DM_EXPORT_*:
DM_EXPORT_SYMBOL(func,ver)
DM_EXPORT_SYMBOL_BASE(func,ver)
For functions that have multiple implementations these macros control
symbol export and versioning.
Function definitions that exist in only one version never need to use
these macros.
Backwards compatible implementations must include a version tag of
the form "_v1_02_104" as a suffix to the function name and use the
macro DM_EXPORT_SYMBOL to export the function and bind it to the
specified version string.
Since versioning is only available when compiling with GCC the entire
compatibility version should be enclosed in '#if defined(__GNUC__)',
for example:
int dm_foo(int bar)
{
return bar;
}
#if defined(__GNUC__)
// Backward compatible dm_foo() version 1.02.104
int dm_foo_v1_02_104(void);
int dm_foo_v1_02_104(void)
{
return 0;
}
DM_EXPORT_SYMBOL(dm_foo,1_02_104)
#endif
A prototype for the compatibility version is required as these
functions must not be declared static.
The DM_EXPORT_SYMBOL_BASE macro is only used to export the base
versions of library symbols prior to the introduction of symbol
versioning: it must never be used for new symbols.
---
lib/misc/lib.h | 53 ++++++++++++++++++++++++++++++++++++++----
libdm/.exported_symbols.Base | 1 -
libdm/ioctl/libdm-iface.c | 12 ++-------
3 files changed, 51 insertions(+), 15 deletions(-)
diff --git a/lib/misc/lib.h b/lib/misc/lib.h
index 63f60a2..5e76e54 100644
--- a/lib/misc/lib.h
+++ b/lib/misc/lib.h
@@ -25,14 +25,57 @@
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
+/*
+ * Symbol export control macros
+ *
+ * DM_EXPORT_SYMBOL(func,ver)
+ * DM_EXPORT_SYMBOL_BASE(func,ver)
+ *
+ * For functions that have multiple implementations these macros control
+ * symbol export and versioning.
+ *
+ * Function definitions that exist in only one version never need to use
+ * these macros.
+ *
+ * Backwards compatible implementations must include a version tag of
+ * the form "_v1_02_104" as a suffix to the function name and use the
+ * macro DM_EXPORT_SYMBOL to export the function and bind it to the
+ * specified version string.
+ *
+ * Since versioning is only available when compiling with GCC the entire
+ * compatibility version should be enclosed in '#if defined(__GNUC__)',
+ * for example:
+ *
+ * int dm_foo(int bar)
+ * {
+ * return bar;
+ * }
+ *
+ * #if defined(__GNUC__)
+ * // Backward compatible dm_foo() version 1.02.104
+ * int dm_foo_v1_02_104(void);
+ * int dm_foo_v1_02_104(void)
+ * {
+ * return 0;
+ * }
+ * DM_EXPORT_SYMBOL(dm_foo,1_02_104)
+ * #endif
+ *
+ * A prototype for the compatibility version is required as these
+ * functions must not be declared static.
+ *
+ * The DM_EXPORT_SYMBOL_BASE macro is only used to export the base
+ * versions of library symbols prior to the introduction of symbol
+ * versioning: it must never be used for new symbols.
+ */
#if defined(__GNUC__)
-#define DM_EXPORTED_SYMBOL(func, ver) \
- __asm__(".symver " #func "_v" #ver ", " #func "@@DM_" #ver )
-#define DM_EXPORTED_SYMBOL_BASE(func) \
+#define DM_EXPORT_SYMBOL(func, ver) \
+ __asm__(".symver " #func "_v" #ver ", " #func "@DM_" #ver )
+#define DM_EXPORT_SYMBOL_BASE(func) \
__asm__(".symver " #func "_base, " #func "@Base" )
#else
-#define DM_EXPORTED_SYMBOL(func, ver)
-#define DM_EXPORTED_SYMBOL_BASE(func)
+#define DM_EXPORT_SYMBOL(func, ver)
+#define DM_EXPORT_SYMBOL_BASE(func)
#endif
diff --git a/libdm/.exported_symbols.Base b/libdm/.exported_symbols.Base
index 865a6a8..f9c3cb1 100644
--- a/libdm/.exported_symbols.Base
+++ b/libdm/.exported_symbols.Base
@@ -179,7 +179,6 @@ dm_task_destroy
dm_task_enable_checks
dm_task_get_deps
dm_task_get_driver_version
-dm_task_get_info
dm_task_get_info_with_deferred_remove
dm_task_get_message_response
dm_task_get_name
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
index fe0bffa..e9566c2 100644
--- a/libdm/ioctl/libdm-iface.c
+++ b/libdm/ioctl/libdm-iface.c
@@ -681,13 +681,7 @@ int dm_format_dev(char *buf, int bufsize, uint32_t dev_major,
return 1;
}
-#if defined(__GNUC__)
-int dm_task_get_info_v1_02_97(struct dm_task *dmt, struct dm_info *info);
-DM_EXPORTED_SYMBOL(dm_task_get_info, 1_02_97);
-int dm_task_get_info_v1_02_97(struct dm_task *dmt, struct dm_info *info)
-#else
int dm_task_get_info(struct dm_task *dmt, struct dm_info *info)
-#endif
{
if (!dmt->dmi.v4)
return 0;
@@ -2140,12 +2134,12 @@ void dm_lib_exit(void)
*/
int dm_task_get_info_base(struct dm_task *dmt, struct dm_info *info);
-DM_EXPORTED_SYMBOL_BASE(dm_task_get_info);
+DM_EXPORT_SYMBOL_BASE(dm_task_get_info);
int dm_task_get_info_base(struct dm_task *dmt, struct dm_info *info)
{
struct dm_info new_info;
- if (!dm_task_get_info_v1_02_97(dmt, &new_info))
+ if (!dm_task_get_info(dmt, &new_info))
return 0;
memcpy(info, &new_info, offsetof(struct dm_info, deferred_remove));
@@ -2158,7 +2152,7 @@ int dm_task_get_info_with_deferred_remove(struct dm_task *dmt, struct dm_info *i
{
struct dm_info new_info;
- if (!dm_task_get_info_v1_02_97(dmt, &new_info))
+ if (!dm_task_get_info(dmt, &new_info))
return 0;
memcpy(info, &new_info, offsetof(struct dm_info, internal_suspend));
8 years, 8 months
master - tests: fix check for lvmlockd test
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ba898b9ab6f021...
Commit: ba898b9ab6f02153eb3fa44d1e893f6b49424652
Parent: d827dd8b053d69adf3cdfa6f3b8071af4b0e3846
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Aug 21 17:00:21 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Aug 21 17:00:21 2015 -0500
tests: fix check for lvmlockd test
---
test/shell/lvmlockd-lv-types.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvmlockd-lv-types.sh b/test/shell/lvmlockd-lv-types.sh
index 79cde22..64c0362 100644
--- a/test/shell/lvmlockd-lv-types.sh
+++ b/test/shell/lvmlockd-lv-types.sh
@@ -13,7 +13,7 @@ test_description='Check lvmlockd lock_args for different LV types'
. lib/inittest
-test -e LOCAL_LVMLOCKD && skip
+[ -z "$LVM_TEST_LVMLOCKD" ] && skip;
if test -n "$LVM_TEST_LOCK_TYPE_SANLOCK" ; then
LOCKARGS1="1.0.0:70254592"
8 years, 8 months
master - tests: add test for lvmlockd lock_args
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d827dd8b053d69...
Commit: d827dd8b053d69adf3cdfa6f3b8071af4b0e3846
Parent: e53758c5f6074f920325afe0a01616f7c663f766
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Aug 21 15:06:28 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Aug 21 15:09:38 2015 -0500
tests: add test for lvmlockd lock_args
---
test/shell/lvmlockd-lv-types.sh | 164 +++++++++++++++++++++++++++++++++++++++
1 files changed, 164 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvmlockd-lv-types.sh b/test/shell/lvmlockd-lv-types.sh
new file mode 100644
index 0000000..79cde22
--- /dev/null
+++ b/test/shell/lvmlockd-lv-types.sh
@@ -0,0 +1,164 @@
+#!/bin/sh
+# Copyright (C) 2008-2012 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+test_description='Check lvmlockd lock_args for different LV types'
+
+. lib/inittest
+
+test -e LOCAL_LVMLOCKD && skip
+
+if test -n "$LVM_TEST_LOCK_TYPE_SANLOCK" ; then
+LOCKARGS1="1.0.0:70254592"
+LOCKARGS2="1.0.0:71303168"
+LOCKARGS3="1.0.0:72351744"
+fi
+
+if test -n "$LVM_TEST_LOCK_TYPE_DLM" ; then
+LOCKARGS1="dlm"
+LOCKARGS2="dlm"
+LOCKARGS3="dlm"
+fi
+
+aux prepare_devs 5
+
+vgcreate --shared $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5"
+
+#
+# thin pool, thin lv, thin snap
+#
+
+lvcreate -L 8M -n pool1 $vg
+check lva_field $vg/pool1 lockargs $LOCKARGS1
+
+lvcreate -L 8M -n pool1_meta $vg
+check lva_field $vg/pool1_meta lockargs $LOCKARGS2
+
+lvconvert -y --type thin-pool --poolmetadata $vg/pool1_meta $vg/pool1
+check lva_field $vg/pool1 lockargs $LOCKARGS3
+check lva_field $vg/pool1_tdata lockargs ""
+check lva_field $vg/pool1_tmeta lockargs ""
+
+lvcreate -n thin1 -V 1G --thinpool $vg/pool1
+check lva_field $vg/thin1 lockargs ""
+
+lvcreate -s -n snap1 $vg/thin1
+check lva_field $vg/snap1 lockargs ""
+
+lvchange -ay -K $vg/snap1
+
+lvchange -an $vg/snap1
+lvchange -an $vg/thin1
+lvchange -an $vg/pool1
+lvremove $vg/snap1
+lvremove $vg/thin1
+lvremove $vg/pool1
+
+# the first sanlock lock should be found and reused
+lvcreate -L 8M -n lv1 $vg
+check lva_field $vg/lv1 lockargs $LOCKARGS1
+
+lvchange -an $vg/lv1
+lvremove $vg/lv1
+
+
+#
+# with automatic metadata lv
+#
+
+lvcreate -L 8M -n pool2 $vg
+check lva_field $vg/pool2 lockargs $LOCKARGS1
+
+lvconvert -y --type thin-pool $vg/pool2
+check lva_field $vg/pool2 lockargs $LOCKARGS2
+check lva_field $vg/pool2_tdata lockargs ""
+check lva_field $vg/pool2_tmeta lockargs ""
+
+lvcreate -n thin2 -V 1G --thinpool $vg/pool2
+check lva_field $vg/thin2 lockargs ""
+
+lvchange -an $vg/thin2
+lvchange -an $vg/pool2
+lvremove $vg/thin2
+lvremove $vg/pool2
+
+
+#
+# cache pool, cache lv
+#
+
+lvcreate -L 8M -n cache1 $vg
+check lva_field $vg/cache1 lockargs $LOCKARGS1
+
+lvcreate -L 8M -n cache1_meta $vg
+check lva_field $vg/cache1_meta lockargs $LOCKARGS2
+
+lvconvert -y --type cache-pool --poolmetadata $vg/cache1_meta $vg/cache1
+check lva_field $vg/cache1 lockargs ""
+check lva_field $vg/cache1_cdata lockargs ""
+check lva_field $vg/cache1_cmeta lockargs ""
+
+lvcreate -n lv1 -L 8M $vg
+check lva_field $vg/lv1 lockargs $LOCKARGS1
+
+lvconvert -y --type cache --cachepool $vg/cache1 $vg/lv1
+check lva_field $vg/lv1 lockargs $LOCKARGS1
+check lva_field $vg/cache1 lockargs ""
+check lva_field $vg/cache1_cdata lockargs ""
+check lva_field $vg/cache1_cmeta lockargs ""
+
+lvconvert --splitcache $vg/lv1
+check lva_field $vg/lv1 lockargs $LOCKARGS1
+check lva_field $vg/cache1 lockargs ""
+check lva_field $vg/cache1_cdata lockargs ""
+check lva_field $vg/cache1_cmeta lockargs ""
+
+lvchange -an $vg/cache1
+lvchange -an $vg/lv1
+lvremove $vg/cache1
+lvremove $vg/lv1
+
+#
+# cow snap
+#
+
+lvcreate -n lv2 -L 8M $vg
+check lva_field $vg/lv2 lockargs $LOCKARGS1
+
+lvcreate -s -n lv2snap -L 8M $vg/lv2
+check lva_field $vg/lv2 lockargs $LOCKARGS1
+check lva_field $vg/lv2snap lockargs ""
+
+lvchange -y -an $vg/lv2
+lvremove $vg/lv2snap
+lvremove $vg/lv2
+
+#
+# mirror
+#
+
+lvcreate --type mirror -m 1 -n lv3 -L 8M $vg
+check lva_field $vg/lv3 lockargs $LOCKARGS1
+
+lvchange -an $vg/lv3
+lvremove $vg/lv3
+
+#
+# raid1
+#
+
+lvcreate --type raid1 -m 1 -n lv4 -L 8M $vg
+check lva_field $vg/lv4 lockargs $LOCKARGS1
+
+lvchange -an $vg/lv4
+lvremove $vg/lv4
+
+vgremove $vg
+
8 years, 8 months
master - tests: add lib function to test hidden LVs with lvs -a
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e53758c5f6074f...
Commit: e53758c5f6074f920325afe0a01616f7c663f766
Parent: 1f27c9f6a44cb893b6653641b35295e129531bf8
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Aug 21 15:06:00 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Aug 21 15:09:38 2015 -0500
tests: add lib function to test hidden LVs with lvs -a
---
test/lib/check.sh | 6 ++++++
test/lib/get.sh | 5 +++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/test/lib/check.sh b/test/lib/check.sh
index a6a9b38..9d48851 100644
--- a/test/lib/check.sh
+++ b/test/lib/check.sh
@@ -308,6 +308,12 @@ lv_field() {
die "lv_field: lv=$1, field=\"$2\", actual=\"$actual\", expected=\"$3\""
}
+lva_field() {
+ local actual=$(get lva_field "$1" "$2" "${@:4}")
+ test "$actual" = "$3" || \
+ die "lva_field: lv=$1, field=\"$2\", actual=\"$actual\", expected=\"$3\""
+}
+
lv_attr_bit() {
local actual=$(get lv_field "$2" lv_attr "${@:4}")
local offset=$1
diff --git a/test/lib/get.sh b/test/lib/get.sh
index ef1ddc4..1b432c6 100644
--- a/test/lib/get.sh
+++ b/test/lib/get.sh
@@ -42,6 +42,11 @@ lv_field() {
trim_ "$r"
}
+lva_field() {
+ local r=$(lvs -a --config 'log{prefix=""}' --noheadings -o "$2" "${@:3}" "$1")
+ trim_ "$r"
+}
+
lv_devices() {
lv_field "$1" devices -a "${@:2}" | sed 's/([^)]*)//g; s/,/\n/g'
}
8 years, 8 months
master - tests: create/remove improvements for lvmlockd testing
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1f27c9f6a44cb8...
Commit: 1f27c9f6a44cb893b6653641b35295e129531bf8
Parent: d310e1f90720e5ba387efe7ba0d7cc6266d9f844
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Aug 20 16:10:36 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Aug 21 15:09:38 2015 -0500
tests: create/remove improvements for lvmlockd testing
---
test/shell/dlm-remove.sh | 4 ++++
test/shell/sanlock-prepare.sh | 1 +
test/shell/sanlock-remove.sh | 15 +++++++++++++--
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/test/shell/dlm-remove.sh b/test/shell/dlm-remove.sh
index d7af46f..3120d7f 100644
--- a/test/shell/dlm-remove.sh
+++ b/test/shell/dlm-remove.sh
@@ -15,6 +15,10 @@ test_description='Remove the dlm test setup'
[ -z "$LVM_TEST_LOCK_TYPE_DLM" ] && skip;
+# FIXME: collect debug logs (only if a test failed?)
+# lvmlockctl -d > lvmlockd-debug.txt
+# dlm_tool dump > dlm-debug.txt
+
systemctl stop dlm
systemctl stop corosync
killall lvmlockd
diff --git a/test/shell/sanlock-prepare.sh b/test/shell/sanlock-prepare.sh
index 401d6d7..c3a25bf 100644
--- a/test/shell/sanlock-prepare.sh
+++ b/test/shell/sanlock-prepare.sh
@@ -73,6 +73,7 @@ prepare_lvmlockd_sanlock() {
GL_DEV="/dev/mapper/GL_DEV"
GL_FILE="$PWD/gl_file.img"
+dmsetup remove GL_DEV || true
rm -f "$GL_FILE"
dd if=/dev/zero of="$GL_FILE" bs=$((1024*1024)) count=1024 2> /dev/null
GL_LOOP=$(losetup -f "$GL_FILE" --show)
diff --git a/test/shell/sanlock-remove.sh b/test/shell/sanlock-remove.sh
index 47487d6..19a2602 100644
--- a/test/shell/sanlock-remove.sh
+++ b/test/shell/sanlock-remove.sh
@@ -15,14 +15,25 @@ test_description='Remove the sanlock test setup'
[ -z "$LVM_TEST_LOCK_TYPE_SANLOCK" ] && skip;
+# FIMXME: get this to run after a test fails
+
# Removes the VG with the global lock that was created by
# the corresponding create script.
vgremove --config 'devices { global_filter=["a|GL_DEV|", "r|.*|"] filter=["a|GL_DEV|", "r|.*|"]}' glvg
+# FIXME: collect debug logs (only if a test failed?)
+# lvmlockctl -d > lvmlockd-debug.txt
+# sanlock log_dump > sanlock-debug.txt
killall lvmlockd
killall sanlock
-dmsetup remove GL_DEV
-# dmsetup remove glvg-lvmlock
+killall -9 lvmlockd
+killall -9 sanlock
+
+# FIXME: dmsetup remove LVMTEST*-lvmlock
+
+dmsetup remove glvg-lvmlock || true
+dmsetup remove GL_DEV || true
+
8 years, 8 months
master - test: allow tests with lvmlockd
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d310e1f90720e5...
Commit: d310e1f90720e5ba387efe7ba0d7cc6266d9f844
Parent: 81d4c4a84c92f7db8f79a17aced4fb3b86f86aa8
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Aug 20 16:09:29 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Aug 21 15:09:38 2015 -0500
test: allow tests with lvmlockd
---
test/shell/process-each-pv-nomda-all.sh | 10 +++++-----
test/shell/process-each-pv-nomda.sh | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/test/shell/process-each-pv-nomda-all.sh b/test/shell/process-each-pv-nomda-all.sh
index 1a2af58..972bb85 100644
--- a/test/shell/process-each-pv-nomda-all.sh
+++ b/test/shell/process-each-pv-nomda-all.sh
@@ -13,8 +13,6 @@ test_description='Test process_each_pv with zero mda'
. lib/inittest
-test -e LOCAL_LVMPOLLD && skip
-
aux prepare_devs 14
# for vg1
@@ -41,9 +39,9 @@ pvcreate "$dev14" --metadatacopies 0
# dev12
# dev13
-vgcreate $vg1 "$dev10"
-vgcreate $vg2 "$dev2" "$dev3" "$dev4" "$dev5"
-vgcreate $vg3 "$dev6" "$dev7" "$dev8" "$dev9"
+vgcreate $SHARED $vg1 "$dev10"
+vgcreate $SHARED $vg2 "$dev2" "$dev3" "$dev4" "$dev5"
+vgcreate $SHARED $vg3 "$dev6" "$dev7" "$dev8" "$dev9"
pvs -a | tee err
grep "$dev10" err
@@ -59,3 +57,5 @@ grep "$dev11" err
grep "$dev12" err
grep "$dev13" err
grep "$dev14" err
+
+vgremove $vg1 $vg2 $vg3
diff --git a/test/shell/process-each-pv-nomda.sh b/test/shell/process-each-pv-nomda.sh
index 642f2e4..13fddb3 100644
--- a/test/shell/process-each-pv-nomda.sh
+++ b/test/shell/process-each-pv-nomda.sh
@@ -13,15 +13,15 @@ test_description='Test process_each_pv with zero mda'
. lib/inittest
-test -e LOCAL_LVMPOLLD && skip
-
aux prepare_devs 2
pvcreate "$dev1" --metadatacopies 0
pvcreate "$dev2"
-vgcreate $vg1 "$dev1" "$dev2"
+vgcreate $SHARED $vg1 "$dev1" "$dev2"
pvdisplay -a -C | tee err
grep "$dev1" err
grep "$dev2" err
+
+vgremove $vg1
8 years, 8 months
master - WHATS_NEW
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=81d4c4a84c92f7...
Commit: 81d4c4a84c92f7db8f79a17aced4fb3b86f86aa8
Parent: 1c811bfcd96abcd5058a6dc9877502072a862833
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Aug 21 15:37:56 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Aug 21 15:37:56 2015 +0200
WHATS_NEW
---
WHATS_NEW | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 3916acc..4eb852c 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
Version 2.02.129 -
===================================
+ Enable usage of --cachepolicy and --cachesetting with lvconvert.
+ Don't allow to reduce size of thin-pool metadata.
Fix debug buffer overflows in cmirrord logging.
Add --foreground and --help to cmirrord.
8 years, 8 months
master - tests: check cachepolicy with lvconvert
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1c811bfcd96abc...
Commit: 1c811bfcd96abcd5058a6dc9877502072a862833
Parent: 6d9e7d48fb34010f0e1447e99a92193b153acdc3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Aug 21 15:34:32 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Aug 21 15:35:45 2015 +0200
tests: check cachepolicy with lvconvert
---
test/shell/lvconvert-cache-smq.sh | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvconvert-cache-smq.sh b/test/shell/lvconvert-cache-smq.sh
new file mode 100644
index 0000000..cdc7838
--- /dev/null
+++ b/test/shell/lvconvert-cache-smq.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+# Copyright (C) 2014 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Exercise conversion of cache and cache pool
+
+. lib/inittest
+
+test -e LOCAL_LVMPOLLD && skip
+
+aux have_cache 1 8 0 || skip
+
+aux prepare_vg 5 80
+
+lvcreate --type cache-pool -an -v -L 2 -n cpool $vg
+
+lvcreate -H --cachepolicy smq -L 4 -n corigin --cachepool $vg/cpool
+
+check lv_field $vg/corigin cache_policy "smq"
+
+lvconvert --splitcache $vg/corigin
+
+lvs -o+cache_policy -a $vg
+
+vgremove -f $vg
8 years, 8 months
master - cleanup: add .
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6d9e7d48fb3401...
Commit: 6d9e7d48fb34010f0e1447e99a92193b153acdc3
Parent: c868609cff48597db50ac5bb98ecba0ecc828dbd
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Aug 20 15:09:23 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Aug 21 15:35:45 2015 +0200
cleanup: add .
---
lib/metadata/lv_manip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 5630234..88c516b 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -5327,7 +5327,7 @@ int lv_resize(struct cmd_context *cmd, struct logical_volume *lv,
}
}
- log_print_unless_silent("Logical volume %s successfully resized", lp->lv_name);
+ log_print_unless_silent("Logical volume %s successfully resized.", lp->lv_name);
if (lp->resizefs && (lp->resize == LV_EXTEND) &&
!_fsadm_cmd(cmd, vg, lp, FSADM_CMD_RESIZE, NULL))
8 years, 8 months
master - man: fix sqm typo
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c868609cff4859...
Commit: c868609cff48597db50ac5bb98ecba0ecc828dbd
Parent: e4b9ac46d74e2783d4a27ceffc49d7f97fe4409f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Aug 21 11:06:18 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Aug 21 15:35:45 2015 +0200
man: fix sqm typo
---
man/lvconvert.8.in | 2 +-
man/lvcreate.8.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/lvconvert.8.in b/man/lvconvert.8.in
index 562de1e..c2ee2b2 100644
--- a/man/lvconvert.8.in
+++ b/man/lvconvert.8.in
@@ -228,7 +228,7 @@ For more information on cache pool LVs and cache LVs, see \fBlvmcache\fP(7).
.TP
.B \-\-cachepolicy \fIpolicy
Only applicable to cached LVs; see also \fBlvmcache(7)\fP. Sets
-the cache policy. \fImq\fP is the basic policy name. \fIsqm\fP is more advanced
+the cache policy. \fImq\fP is the basic policy name. \fIsmq\fP is more advanced
version available in newer kernels.
.TP
.BR \-\-cachepool " " \fICachePoolLV
diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in
index 5f922b4..ee10392 100644
--- a/man/lvcreate.8.in
+++ b/man/lvcreate.8.in
@@ -200,7 +200,7 @@ cache pool LV.
.TP
.B \-\-cachepolicy \fIpolicy
Only applicable to cached LVs; see also \fBlvmcache(7)\fP. Sets
-the cache policy. \fImq\fP is the basic policy name. \fIsqm\fP is more advanced
+the cache policy. \fImq\fP is the basic policy name. \fIsmq\fP is more advanced
version available in newer kernels.
.TP
.IR \fB\-\-cachepool " " CachePoolLogicalVolume { Name | Path }
8 years, 8 months