master - cleanup: rename 'invisible devices' to 'hidden devices'
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=04d1a8a5e41bd9...
Commit: 04d1a8a5e41bd9fbcaa885b0b13faba85db532d9
Parent: 939d29652579e4759d445c87dc21d1a6b37fd97d
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jan 13 16:43:25 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jan 13 16:43:25 2016 +0100
cleanup: rename 'invisible devices' to 'hidden devices'
---
test/lib/aux.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 51dba36..439d79e 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -880,7 +880,7 @@ log/level = 9
log/overwrite = 1
log/syslog = 0
log/verbose = 0
-report/mark_invisible_devices=0
+report/mark_hidden_devices=0
EOF
}
8 years, 3 months
master - conf: fix 'the volume list' vs 'volume list' and '@*'
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=939d29652579e4...
Commit: 939d29652579e4759d445c87dc21d1a6b37fd97d
Parent: 9a81881965f1c990632c13699f2184cd1680cf39
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jan 13 15:47:26 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jan 13 15:47:26 2016 +0100
conf: fix 'the volume list' vs 'volume list' and '@*'
---
conf/example.conf.in | 12 ++++++------
lib/config/config_settings.h | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index e567a73..4dbe289 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -1108,8 +1108,8 @@ activation {
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
- # or VG. See tags/hosttags. If any host tags exist but the volume
- # list is not defined, a default single-entry list containing '@*'
+ # or VG. See tags/hosttags. If any host tags exist but volume_list
+ # is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
@@ -1145,8 +1145,8 @@ activation {
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
- # or VG. See tags/hosttags. If any host tags exist but the volume
- # list is not defined, a default single-entry list containing '@*'
+ # or VG. See tags/hosttags. If any host tags exist but volume_list
+ # is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
@@ -1171,8 +1171,8 @@ activation {
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
- # or VG. See tags/hosttags. If any host tags exist but the volume
- # list is not defined, a default single-entry list containing '@*'
+ # or VG. See tags/hosttags. If any host tags exist but volume_list
+ # is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 60b5110..dcebe99 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -1066,8 +1066,8 @@ cfg_array(activation_volume_list_CFG, "volume_list", activation_CFG_SECTION, CFG
" or VG.\n"
" @*\n"
" Selects an LV if a tag defined on the host is also set on the LV\n"
- " or VG. See tags/hosttags. If any host tags exist but the volume\n"
- " list is not defined, a default single-entry list containing '@*'\n"
+ " or VG. See tags/hosttags. If any host tags exist but volume_list\n"
+ " is not defined, a default single-entry list containing '@*'\n"
" is assumed.\n"
"#\n"
"Example\n"
@@ -1102,8 +1102,8 @@ cfg_array(activation_auto_activation_volume_list_CFG, "auto_activation_volume_li
" or VG.\n"
" @*\n"
" Selects an LV if a tag defined on the host is also set on the LV\n"
- " or VG. See tags/hosttags. If any host tags exist but the volume\n"
- " list is not defined, a default single-entry list containing '@*'\n"
+ " or VG. See tags/hosttags. If any host tags exist but volume_list\n"
+ " is not defined, a default single-entry list containing '@*'\n"
" is assumed.\n"
"#\n"
"Example\n"
@@ -1127,8 +1127,8 @@ cfg_array(activation_read_only_volume_list_CFG, "read_only_volume_list", activat
" or VG.\n"
" @*\n"
" Selects an LV if a tag defined on the host is also set on the LV\n"
- " or VG. See tags/hosttags. If any host tags exist but the volume\n"
- " list is not defined, a default single-entry list containing '@*'\n"
+ " or VG. See tags/hosttags. If any host tags exist but volume_list\n"
+ " is not defined, a default single-entry list containing '@*'\n"
" is assumed.\n"
"#\n"
"Example\n"
8 years, 3 months
master - cleanup: rename 'invisible devices' to 'hidden devices'
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9a81881965f1c9...
Commit: 9a81881965f1c990632c13699f2184cd1680cf39
Parent: 1417ed304bf7db0bda167ee83cfbb4126ba4913d
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jan 13 15:37:15 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jan 13 15:37:15 2016 +0100
cleanup: rename 'invisible devices' to 'hidden devices'
---
conf/command_profile_template.profile.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/conf/command_profile_template.profile.in b/conf/command_profile_template.profile.in
index 57fc6c0..3e5b031 100644
--- a/conf/command_profile_template.profile.in
+++ b/conf/command_profile_template.profile.in
@@ -55,5 +55,5 @@ report {
pvsegs_sort="pv_name,pvseg_start"
pvsegs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
pvsegs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
- mark_invisible_devices=1
+ mark_hidden_devices=1
}
8 years, 3 months
master - cleanup: rename 'invisible devices' to 'hidden devices'
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1417ed304bf7db...
Commit: 1417ed304bf7db0bda167ee83cfbb4126ba4913d
Parent: d2d5c5e6c995b34ba36c026c8da7cdd316b69ee5
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jan 13 15:21:05 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jan 13 15:22:46 2016 +0100
cleanup: rename 'invisible devices' to 'hidden devices'
---
WHATS_NEW | 4 ++--
conf/example.conf.in | 6 +++---
lib/commands/toolcontext.c | 2 +-
lib/commands/toolcontext.h | 2 +-
lib/config/config_settings.h | 4 ++--
lib/metadata/lv.c | 14 +++++++-------
lib/report/report.c | 2 +-
test/shell/report-hidden.sh | 39 +++++++++++++++++++++++++++++++++++++++
test/shell/report-invisible.sh | 39 ---------------------------------------
9 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index fb485b3..aff000f 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,7 +1,7 @@
Version 2.02.140 -
===================================
- Add report/mark_invisible_devices to lvm.conf.
- Use brackets consistently in report fields to mark invisible devices.
+ Add report/mark_hidden_devices to lvm.conf.
+ Use brackets consistently in report fields to mark hidden devices.
Restore background polling processing during auto-activation (2.02.119).
Fix invalid memory read when reporting cache LV policy_name (2.02.126).
diff --git a/conf/example.conf.in b/conf/example.conf.in
index f549f15..e567a73 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -1809,10 +1809,10 @@ activation {
# This configuration option has an automatic default value.
# pvsegs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
- # Configuration option report/mark_invisible_devices.
- # Use brackets [] to mark invisible devices.
+ # Configuration option report/mark_hidden_devices.
+ # Use brackets [] to mark hidden devices.
# This configuration option has an automatic default value.
- # mark_invisible_devices = 1
+ # mark_hidden_devices = 1
# }
# Configuration section dmeventd.
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index a8bf187..6163bdc 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -478,7 +478,7 @@ int process_profilable_config(struct cmd_context *cmd)
cmd->si_unit_consistency = find_config_tree_bool(cmd, global_si_unit_consistency_CFG, NULL);
cmd->report_binary_values_as_numeric = find_config_tree_bool(cmd, report_binary_values_as_numeric_CFG, NULL);
- cmd->report_mark_invisible_devices = find_config_tree_bool(cmd, report_mark_invisible_devices_CFG, NULL);
+ cmd->report_mark_hidden_devices = find_config_tree_bool(cmd, report_mark_hidden_devices_CFG, NULL);
cmd->default_settings.suffix = find_config_tree_bool(cmd, global_suffix_CFG, NULL);
cmd->report_list_item_separator = find_config_tree_str(cmd, report_list_item_separator_CFG, NULL);
if (!(cmd->time_format = _set_time_format(cmd)))
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h
index 5a7b3af..b2033fc 100644
--- a/lib/commands/toolcontext.h
+++ b/lib/commands/toolcontext.h
@@ -121,7 +121,7 @@ struct cmd_context {
unsigned auto_set_activation_skip:1;
unsigned si_unit_consistency:1;
unsigned report_binary_values_as_numeric:1;
- unsigned report_mark_invisible_devices:1;
+ unsigned report_mark_hidden_devices:1;
unsigned metadata_read_only:1;
unsigned ignore_clustered_vgs:1;
unsigned threaded:1; /* set if running within a thread e.g. clvmd */
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index bb5d7d9..60b5110 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -1671,8 +1671,8 @@ cfg(report_pvsegs_cols_verbose_CFG, "pvsegs_cols_verbose", report_CFG_SECTION, C
"List of columns to sort by when reporting 'pvs --segments' command in verbose mode.\n"
"See 'pvs --segments -o help' for the list of possible fields.\n")
-cfg(report_mark_invisible_devices_CFG, "mark_invisible_devices", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, 1, vsn(2, 2, 140), NULL, 0, NULL,
- "Use brackets [] to mark invisible devices.\n")
+cfg(report_mark_hidden_devices_CFG, "mark_hidden_devices", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, 1, vsn(2, 2, 140), NULL, 0, NULL,
+ "Use brackets [] to mark hidden devices.\n")
cfg(dmeventd_mirror_library_CFG, "mirror_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_MIRROR_LIB, vsn(1, 2, 3), NULL, 0, NULL,
"The library dmeventd uses when monitoring a mirror device.\n"
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c
index 44db4df..96f6f5c 100644
--- a/lib/metadata/lv.c
+++ b/lib/metadata/lv.c
@@ -30,7 +30,7 @@ static int _utsinit = 0;
static char *_format_pvsegs(struct dm_pool *mem, const struct lv_segment *seg,
int range_format, int metadata_areas_only,
- int mark_invisible)
+ int mark_hidden)
{
static const char pool_grow_object_failed_msg[] = "dm_pool_grow_object failed";
unsigned int s;
@@ -72,7 +72,7 @@ static char *_format_pvsegs(struct dm_pool *mem, const struct lv_segment *seg,
return NULL;
}
- if (!visible && mark_invisible && !dm_pool_grow_object(mem, "[", 1)) {
+ if (!visible && mark_hidden && !dm_pool_grow_object(mem, "[", 1)) {
log_error(pool_grow_object_failed_msg);
return NULL;
}
@@ -82,7 +82,7 @@ static char *_format_pvsegs(struct dm_pool *mem, const struct lv_segment *seg,
return NULL;
}
- if (!visible && mark_invisible && !dm_pool_grow_object(mem, "]", 1)) {
+ if (!visible && mark_hidden && !dm_pool_grow_object(mem, "]", 1)) {
log_error(pool_grow_object_failed_msg);
return NULL;
}
@@ -129,22 +129,22 @@ out:
char *lvseg_devices(struct dm_pool *mem, const struct lv_segment *seg)
{
- return _format_pvsegs(mem, seg, 0, 0, seg->lv->vg->cmd->report_mark_invisible_devices);
+ return _format_pvsegs(mem, seg, 0, 0, seg->lv->vg->cmd->report_mark_hidden_devices);
}
char *lvseg_metadata_devices(struct dm_pool *mem, const struct lv_segment *seg)
{
- return _format_pvsegs(mem, seg, 0, 1, seg->lv->vg->cmd->report_mark_invisible_devices);
+ return _format_pvsegs(mem, seg, 0, 1, seg->lv->vg->cmd->report_mark_hidden_devices);
}
char *lvseg_seg_pe_ranges(struct dm_pool *mem, const struct lv_segment *seg)
{
- return _format_pvsegs(mem, seg, 1, 0, seg->lv->vg->cmd->report_mark_invisible_devices);
+ return _format_pvsegs(mem, seg, 1, 0, seg->lv->vg->cmd->report_mark_hidden_devices);
}
char *lvseg_seg_metadata_le_ranges(struct dm_pool *mem, const struct lv_segment *seg)
{
- return _format_pvsegs(mem, seg, 1, 1, seg->lv->vg->cmd->report_mark_invisible_devices);
+ return _format_pvsegs(mem, seg, 1, 1, seg->lv->vg->cmd->report_mark_hidden_devices);
}
char *lvseg_tags_dup(const struct lv_segment *seg)
diff --git a/lib/report/report.c b/lib/report/report.c
index 3c73a2f..40fcdd8 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -1586,7 +1586,7 @@ static int _lvname_disp(struct dm_report *rh, struct dm_pool *mem,
char *repstr, *lvname;
size_t len;
- if (lv_is_visible(lv) || !cmd->report_mark_invisible_devices)
+ if (lv_is_visible(lv) || !cmd->report_mark_hidden_devices)
return _string_disp(rh, mem, field, &lv->name, private);
len = strlen(lv->name) + 3;
diff --git a/test/shell/report-hidden.sh b/test/shell/report-hidden.sh
new file mode 100644
index 0000000..ff33df5
--- /dev/null
+++ b/test/shell/report-hidden.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Copyright (C) 2016 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
+
+SKIP_WITH_LVMETAD=1
+SKIP_WITH_CLVMD=1
+SKIP_WITH_LVMPOLLD=1
+
+. lib/inittest
+
+aux prepare_vg 1
+lvcreate --type mirror -m1 -l1 --alloc anywhere -n $lv1 $vg
+
+aux lvmconf 'log/prefix=""'
+
+aux lvmconf "report/mark_hidden_devices = 0"
+lvs --noheadings -a -o name $vg > out
+grep "^${lv1}_mimage_0" out
+not grep "^\[${lv1}_mimage_0\]" out
+lvs --noheadings -a -o devices $vg/$lv1 > out
+grep "^${lv1}_mimage_0" out
+not grep "^\[${lv1}_mimage_0\]" out
+
+aux lvmconf "report/mark_hidden_devices = 1"
+lvs --noheadings -a -o name $vg > out
+grep "^\[${lv1}_mimage_0\]" out
+not grep "^${lv1}_mimage_0" out
+lvs --noheadings -a -o devices $vg/$lv1 > out
+grep "^\[${lv1}_mimage_0\]" out
+not grep "^${lv1}_mimage_0" out
+
+vgremove -ff $vg
diff --git a/test/shell/report-invisible.sh b/test/shell/report-invisible.sh
deleted file mode 100644
index d906c97..0000000
--- a/test/shell/report-invisible.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2016 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
-
-SKIP_WITH_LVMETAD=1
-SKIP_WITH_CLVMD=1
-SKIP_WITH_LVMPOLLD=1
-
-. lib/inittest
-
-aux prepare_vg 1
-lvcreate --type mirror -m1 -l1 --alloc anywhere -n $lv1 $vg
-
-aux lvmconf 'log/prefix=""'
-
-aux lvmconf "report/mark_invisible_devices = 0"
-lvs --noheadings -a -o name $vg > out
-grep "^${lv1}_mimage_0" out
-not grep "^\[${lv1}_mimage_0\]" out
-lvs --noheadings -a -o devices $vg/$lv1 > out
-grep "^${lv1}_mimage_0" out
-not grep "^\[${lv1}_mimage_0\]" out
-
-aux lvmconf "report/mark_invisible_devices = 1"
-lvs --noheadings -a -o name $vg > out
-grep "^\[${lv1}_mimage_0\]" out
-not grep "^${lv1}_mimage_0" out
-lvs --noheadings -a -o devices $vg/$lv1 > out
-grep "^\[${lv1}_mimage_0\]" out
-not grep "^${lv1}_mimage_0" out
-
-vgremove -ff $vg
8 years, 3 months
master - WHATS_NEW: reports and invisible devices
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d2d5c5e6c995b3...
Commit: d2d5c5e6c995b34ba36c026c8da7cdd316b69ee5
Parent: efab21b4115d1cc79c3b02c64cd15f360176c3cb
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jan 13 14:45:49 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jan 13 14:45:49 2016 +0100
WHATS_NEW: reports and invisible devices
---
WHATS_NEW | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 93e0dd5..fb485b3 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,7 +1,8 @@
Version 2.02.140 -
===================================
+ Add report/mark_invisible_devices to lvm.conf.
+ Use brackets consistently in report fields to mark invisible devices.
Restore background polling processing during auto-activation (2.02.119).
- Use brackets to signify LVs which are not visible when reporting lv_parent.
Fix invalid memory read when reporting cache LV policy_name (2.02.126).
Version 2.02.139 - 8th January 2016
8 years, 3 months
master - test: add report-invisible.sh test
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=efab21b4115d1c...
Commit: efab21b4115d1cc79c3b02c64cd15f360176c3cb
Parent: c66a83fdc380f7a4f694481cb3d78d52ce888fa4
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jan 13 14:17:50 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jan 13 14:37:09 2016 +0100
test: add report-invisible.sh test
---
test/shell/report-invisible.sh | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/test/shell/report-invisible.sh b/test/shell/report-invisible.sh
new file mode 100644
index 0000000..d906c97
--- /dev/null
+++ b/test/shell/report-invisible.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Copyright (C) 2016 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
+
+SKIP_WITH_LVMETAD=1
+SKIP_WITH_CLVMD=1
+SKIP_WITH_LVMPOLLD=1
+
+. lib/inittest
+
+aux prepare_vg 1
+lvcreate --type mirror -m1 -l1 --alloc anywhere -n $lv1 $vg
+
+aux lvmconf 'log/prefix=""'
+
+aux lvmconf "report/mark_invisible_devices = 0"
+lvs --noheadings -a -o name $vg > out
+grep "^${lv1}_mimage_0" out
+not grep "^\[${lv1}_mimage_0\]" out
+lvs --noheadings -a -o devices $vg/$lv1 > out
+grep "^${lv1}_mimage_0" out
+not grep "^\[${lv1}_mimage_0\]" out
+
+aux lvmconf "report/mark_invisible_devices = 1"
+lvs --noheadings -a -o name $vg > out
+grep "^\[${lv1}_mimage_0\]" out
+not grep "^${lv1}_mimage_0" out
+lvs --noheadings -a -o devices $vg/$lv1 > out
+grep "^\[${lv1}_mimage_0\]" out
+not grep "^${lv1}_mimage_0" out
+
+vgremove -ff $vg
8 years, 3 months
master - tests: update tests to deal with invisible devices consistently
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c66a83fdc380f7...
Commit: c66a83fdc380f7a4f694481cb3d78d52ce888fa4
Parent: 84a9f750fe00cd47c4ea5139ed66e0b175b66f00
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jan 13 13:55:24 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jan 13 13:55:24 2016 +0100
tests: update tests to deal with invisible devices consistently
---
test/lib/aux.sh | 1 +
test/shell/pvmove-abort.sh | 4 ++--
test/shell/pvmove-resume-1.sh | 20 ++++++++++----------
test/shell/pvmove-resume-2.sh | 10 +++++-----
test/shell/pvmove-resume-multiseg.sh | 18 +++++++++---------
5 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 216dd19..51dba36 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -880,6 +880,7 @@ log/level = 9
log/overwrite = 1
log/syslog = 0
log/verbose = 0
+report/mark_invisible_devices=0
EOF
}
diff --git a/test/shell/pvmove-abort.sh b/test/shell/pvmove-abort.sh
index 336e92a..1fbeb20 100644
--- a/test/shell/pvmove-abort.sh
+++ b/test/shell/pvmove-abort.sh
@@ -51,8 +51,8 @@ pvmove --abort "$dev1"
# check if proper pvmove was canceled
get lv_field $vg name -a | tee out
-not grep "^\[pvmove0\]" out
-grep "^\[pvmove1\]" out
+not grep "^pvmove0" out
+grep "^pvmove1" out
fi
diff --git a/test/shell/pvmove-resume-1.sh b/test/shell/pvmove-resume-1.sh
index f4ba5fa..37f2d24 100644
--- a/test/shell/pvmove-resume-1.sh
+++ b/test/shell/pvmove-resume-1.sh
@@ -88,13 +88,13 @@ test_pvmove_resume() {
aux enable_dev "$dev4"
i=0
- while get lv_field $vg name -a | grep "^\[pvmove"; do
+ while get lv_field $vg name -a | grep "^pvmove"; do
# wait for 30 secs at max
test $i -ge 300 && die "Pvmove is too slow or does not progress."
sleep .1
i=$((i + 1))
done
- while get lv_field $vg1 name -a | grep "^\[pvmove"; do
+ while get lv_field $vg1 name -a | grep "^pvmove"; do
# wait for 30 secs at max
test $i -ge 300 && die "Pvmove is too slow or does not progress."
sleep .1
@@ -170,8 +170,8 @@ pvmove_fg() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
- get lv_field $vg1 name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^pvmove0"
+ get lv_field $vg1 name -a | grep "^pvmove0"
# disable delay device
# fg pvmove would take ages to complete otherwise
@@ -195,8 +195,8 @@ pvmove_bg() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
- get lv_field $vg1 name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^pvmove0"
+ get lv_field $vg1 name -a | grep "^pvmove0"
LVM_TEST_TAG="kill_me_$PREFIX" pvmove -b -i0
}
@@ -215,8 +215,8 @@ pvmove_fg_single() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
- get lv_field $vg1 name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^pvmove0"
+ get lv_field $vg1 name -a | grep "^pvmove0"
# disable delay device
# fg pvmove would take ages to complete otherwise
@@ -241,8 +241,8 @@ pvmove_bg_single() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
- get lv_field $vg1 name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^pvmove0"
+ get lv_field $vg1 name -a | grep "^pvmove0"
LVM_TEST_TAG="kill_me_$PREFIX" pvmove -b "$dev1"
LVM_TEST_TAG="kill_me_$PREFIX" pvmove -b "$dev2"
diff --git a/test/shell/pvmove-resume-2.sh b/test/shell/pvmove-resume-2.sh
index c8643e4..91453e4 100644
--- a/test/shell/pvmove-resume-2.sh
+++ b/test/shell/pvmove-resume-2.sh
@@ -75,7 +75,7 @@ test_pvmove_resume() {
aux enable_dev "$dev2"
i=0
- while get lv_field $vg name -a | grep "^\[pvmove"; do
+ while get lv_field $vg name -a | grep "^pvmove"; do
# wait for 30 secs at max
test $i -ge 300 && die "Pvmove is too slow or does not progress."
sleep .1
@@ -128,7 +128,7 @@ pvmove_fg() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^pvmove0"
aux enable_dev "$dev2"
@@ -148,7 +148,7 @@ pvmove_bg() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^pvmove0"
LVM_TEST_TAG="kill_me_$PREFIX" pvmove -b
}
@@ -166,7 +166,7 @@ pvmove_fg_single() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^pvmove0"
aux enable_dev "$dev2"
@@ -186,7 +186,7 @@ pvmove_bg_single() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^pvmove0"
LVM_TEST_TAG="kill_me_$PREFIX" pvmove -b "$dev1"
}
diff --git a/test/shell/pvmove-resume-multiseg.sh b/test/shell/pvmove-resume-multiseg.sh
index 6982fef..35ee871 100644
--- a/test/shell/pvmove-resume-multiseg.sh
+++ b/test/shell/pvmove-resume-multiseg.sh
@@ -88,7 +88,7 @@ test_pvmove_resume() {
aux enable_dev "$dev5"
i=0
- while get lv_field $vg name -a | grep "^\[pvmove"; do
+ while get lv_field $vg name -a | grep "^pvmove"; do
# wait for 30 secs at max
test $i -ge 300 && die "Pvmove is too slow or does not progress."
sleep .1
@@ -144,8 +144,8 @@ pvmove_fg() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
- get lv_field $vg name -a | grep "^\[pvmove1\]"
+ get lv_field $vg name -a | grep "^pvmove0"
+ get lv_field $vg name -a | grep "^pvmove1"
# disable delay device
# fg pvmove would take ages to complete otherwise
@@ -169,8 +169,8 @@ pvmove_bg() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
- get lv_field $vg name -a | grep "^\[pvmove1\]"
+ get lv_field $vg name -a | grep "^pvmove0"
+ get lv_field $vg name -a | grep "^pvmove1"
LVM_TEST_TAG="kill_me_$PREFIX" pvmove -b
}
@@ -189,8 +189,8 @@ pvmove_fg_single() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
- get lv_field $vg name -a | grep "^\[pvmove1\]"
+ get lv_field $vg name -a | grep "^pvmove0"
+ get lv_field $vg name -a | grep "^pvmove1"
# disable delay device
# fg pvmove would take ages to complete otherwise
@@ -215,8 +215,8 @@ pvmove_bg_single() {
fi
# ...thus finish polling
- get lv_field $vg name -a | grep "^\[pvmove0\]"
- get lv_field $vg name -a | grep "^\[pvmove1\]"
+ get lv_field $vg name -a | grep "^pvmove0"
+ get lv_field $vg name -a | grep "^pvmove1"
LVM_TEST_TAG="kill_me_$PREFIX" pvmove -b "$dev1"
LVM_TEST_TAG="kill_me_$PREFIX" pvmove -b "$dev3"
8 years, 3 months
master - cleanup: cleanup lv.h and put fns into categories for better readability
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=84a9f750fe00cd...
Commit: 84a9f750fe00cd47c4ea5139ed66e0b175b66f00
Parent: 293abbb8d2f438c84d43f7f80570bd09fc5228ea
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jan 12 11:45:17 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jan 13 12:17:00 2016 +0100
cleanup: cleanup lv.h and put fns into categories for better readability
---
lib/metadata/lv.h | 79 +++++++++++++++++++++++++++++------------------------
1 files changed, 43 insertions(+), 36 deletions(-)
diff --git a/lib/metadata/lv.h b/lib/metadata/lv.h
index 2834ae5..bbd4564 100644
--- a/lib/metadata/lv.h
+++ b/lib/metadata/lv.h
@@ -58,21 +58,61 @@ struct logical_volume {
struct lv_with_info_and_seg_status;
+/* LV dependencies */
+struct logical_volume *lv_parent(const struct logical_volume *lv);
+struct logical_volume *lv_convert_lv(const struct logical_volume *lv);
+struct logical_volume *lv_origin_lv(const struct logical_volume *lv);
+struct logical_volume *lv_mirror_log_lv(const struct logical_volume *lv);
+struct logical_volume *lv_data_lv(const struct logical_volume *lv);
+struct logical_volume *lv_convert(const struct logical_volume *lv);
+struct logical_volume *lv_origin(const struct logical_volume *lv);
+struct logical_volume *lv_mirror_log(const struct logical_volume *lv);
+struct logical_volume *lv_data(const struct logical_volume *lv);
+struct logical_volume *lv_metadata_lv(const struct logical_volume *lv);
+struct logical_volume *lv_pool_lv(const struct logical_volume *lv);
+
+/* LV properties */
uint64_t lv_size(const struct logical_volume *lv);
+uint64_t lvseg_size(const struct lv_segment *seg);
+uint64_t lvseg_chunksize(const struct lv_segment *seg);
+uint64_t lv_origin_size(const struct logical_volume *lv);
uint64_t lv_metadata_size(const struct logical_volume *lv);
+struct profile *lv_config_profile(const struct logical_volume *lv);
+const char *lv_layer(const struct logical_volume *lv);
+const struct logical_volume *lv_lock_holder(const struct logical_volume *lv);
+const struct logical_volume *lv_committed(const struct logical_volume *lv);
+int lv_mirror_image_in_sync(const struct logical_volume *lv);
+int lv_raid_image_in_sync(const struct logical_volume *lv);
+int lv_raid_healthy(const struct logical_volume *lv);
+const char *lvseg_name(const struct lv_segment *seg);
+uint64_t lvseg_start(const struct lv_segment *seg);
+char *lvseg_devices(struct dm_pool *mem, const struct lv_segment *seg);
+char *lvseg_metadata_devices(struct dm_pool *mem, const struct lv_segment *seg);
+char *lvseg_seg_pe_ranges(struct dm_pool *mem, const struct lv_segment *seg);
+char *lvseg_seg_metadata_le_ranges(struct dm_pool *mem, const struct lv_segment *seg);
+
+/* LV kernel properties */
+int lv_kernel_major(const struct logical_volume *lv);
+int lv_kernel_minor(const struct logical_volume *lv);
+uint32_t lv_kernel_read_ahead(const struct logical_volume *lv);
+
+/* LV modification functions */
+int lv_set_creation(struct logical_volume *lv,
+ const char *hostname, uint64_t timestamp);
+int lv_active_change(struct cmd_context *cmd, struct logical_volume *lv,
+ enum activation_change activate, int needs_exlusive);
+
+/* LV dup functions */
char *lv_attr_dup_with_info_and_seg_status(struct dm_pool *mem, const struct lv_with_info_and_seg_status *lvdm);
char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_uuid_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_tags_dup(const struct logical_volume *lv);
char *lv_path_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_dmpath_dup(struct dm_pool *mem, const struct logical_volume *lv);
-uint64_t lv_origin_size(const struct logical_volume *lv);
char *lv_move_pv_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_move_pv_uuid_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_convert_lv_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_convert_lv_uuid_dup(struct dm_pool *mem, const struct logical_volume *lv);
-int lv_kernel_major(const struct logical_volume *lv);
-int lv_kernel_minor(const struct logical_volume *lv);
char *lv_mirror_log_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_mirror_log_uuid_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_data_lv_dup(struct dm_pool *mem, const struct logical_volume *lv);
@@ -81,53 +121,20 @@ char *lv_metadata_lv_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_metadata_lv_uuid_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_pool_lv_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_pool_lv_uuid_dup(struct dm_pool *mem, const struct logical_volume *lv);
-
char *lv_modules_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_name_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_fullname_dup(struct dm_pool *mem, const struct logical_volume *lv);
-struct logical_volume *lv_parent(const struct logical_volume *lv);
-struct logical_volume *lv_convert_lv(const struct logical_volume *lv);
-struct logical_volume *lv_origin_lv(const struct logical_volume *lv);
-struct logical_volume *lv_mirror_log_lv(const struct logical_volume *lv);
-struct logical_volume *lv_data_lv(const struct logical_volume *lv);
-struct logical_volume *lv_convert(const struct logical_volume *lv);
-struct logical_volume *lv_origin(const struct logical_volume *lv);
-struct logical_volume *lv_mirror_log(const struct logical_volume *lv);
-struct logical_volume *lv_data(const struct logical_volume *lv);
-struct logical_volume *lv_metadata_lv(const struct logical_volume *lv);
-struct logical_volume *lv_pool_lv(const struct logical_volume *lv);
char *lv_parent_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_origin_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_origin_uuid_dup(struct dm_pool *mem, const struct logical_volume *lv);
-
-uint32_t lv_kernel_read_ahead(const struct logical_volume *lv);
-const char *lvseg_name(const struct lv_segment *seg);
-uint64_t lvseg_start(const struct lv_segment *seg);
-uint64_t lvseg_size(const struct lv_segment *seg);
-uint64_t lvseg_chunksize(const struct lv_segment *seg);
char *lvseg_segtype_dup(struct dm_pool *mem, const struct lv_segment *seg);
char *lvseg_discards_dup(struct dm_pool *mem, const struct lv_segment *seg);
char *lvseg_cachemode_dup(struct dm_pool *mem, const struct lv_segment *seg);
char *lvseg_monitor_dup(struct dm_pool *mem, const struct lv_segment *seg);
char *lvseg_tags_dup(const struct lv_segment *seg);
-char *lvseg_devices(struct dm_pool *mem, const struct lv_segment *seg);
-char *lvseg_metadata_devices(struct dm_pool *mem, const struct lv_segment *seg);
-char *lvseg_seg_pe_ranges(struct dm_pool *mem, const struct lv_segment *seg);
-char *lvseg_seg_metadata_le_ranges(struct dm_pool *mem, const struct lv_segment *seg);
char *lv_time_dup(struct dm_pool *mem, const struct logical_volume *lv, int iso_mode);
char *lv_host_dup(struct dm_pool *mem, const struct logical_volume *lv);
-int lv_set_creation(struct logical_volume *lv,
- const char *hostname, uint64_t timestamp);
-const char *lv_layer(const struct logical_volume *lv);
-int lv_active_change(struct cmd_context *cmd, struct logical_volume *lv,
- enum activation_change activate, int needs_exlusive);
char *lv_active_dup(struct dm_pool *mem, const struct logical_volume *lv);
-const struct logical_volume *lv_lock_holder(const struct logical_volume *lv);
-const struct logical_volume *lv_committed(const struct logical_volume *lv);
-struct profile *lv_config_profile(const struct logical_volume *lv);
char *lv_profile_dup(struct dm_pool *mem, const struct logical_volume *lv);
char *lv_lock_args_dup(struct dm_pool *mem, const struct logical_volume *lv);
-int lv_mirror_image_in_sync(const struct logical_volume *lv);
-int lv_raid_image_in_sync(const struct logical_volume *lv);
-int lv_raid_healthy(const struct logical_volume *lv);
#endif /* _LVM_LV_H */
8 years, 3 months
master - conf: update command_profile_template.profile.in
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=293abbb8d2f438...
Commit: 293abbb8d2f438c84d43f7f80570bd09fc5228ea
Parent: 53b355a24b10d50b5f330d71afa80a491532b07a
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jan 13 12:15:28 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jan 13 12:16:58 2016 +0100
conf: update command_profile_template.profile.in
---
conf/command_profile_template.profile.in | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/conf/command_profile_template.profile.in b/conf/command_profile_template.profile.in
index 402e30c..57fc6c0 100644
--- a/conf/command_profile_template.profile.in
+++ b/conf/command_profile_template.profile.in
@@ -11,14 +11,22 @@
# Refer to 'man lvm.conf' for further information about profiles and
# general configuration file layout.
#
+allocation {
+ cache_mode="writethrough"
+ cache_settings {
+ }
+}
+
global {
units="h"
si_unit_consistency=1
suffix=1
lvdisplay_shows_full_device_path=0
}
+
report {
compact_output=0
+ compact_output_cols=""
aligned=1
buffered=1
headings=1
@@ -28,6 +36,7 @@ report {
quoted=1
colums_as_rows=0
binary_values_as_numeric=0
+ time_format="%Y-%m-%d %T %z"
devtypes_sort="devtype_name"
devtypes_cols="devtype_name,devtype_max_partitions,devtype_description"
devtypes_cols_verbose="devtype_name,devtype_max_partitions,devtype_description"
@@ -46,4 +55,5 @@ report {
pvsegs_sort="pv_name,pvseg_start"
pvsegs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
pvsegs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
+ mark_invisible_devices=1
}
8 years, 3 months
master - conf: regenerate
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=53b355a24b10d5...
Commit: 53b355a24b10d50b5f330d71afa80a491532b07a
Parent: e168b5de75204a554fcb6f9a3bd25dada2561c86
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jan 13 11:58:12 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jan 13 12:01:55 2016 +0100
conf: regenerate
---
conf/example.conf.in | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index b8c0407..f549f15 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -1108,9 +1108,9 @@ activation {
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
- # or VG. See tags/hosttags. If any host tags exist but volume_list
- # is not defined, a default single-entry list containing '@*' is
- # assumed.
+ # or VG. See tags/hosttags. If any host tags exist but the volume
+ # list is not defined, a default single-entry list containing '@*'
+ # is assumed.
#
# Example
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
@@ -1145,12 +1145,12 @@ activation {
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
- # or VG. See tags/hosttags. If any host tags exist but volume_list
- # is not defined, a default single-entry list containing '@*' is
- # assumed.
+ # or VG. See tags/hosttags. If any host tags exist but the volume
+ # list is not defined, a default single-entry list containing '@*'
+ # is assumed.
#
# Example
- # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
+ # auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
@@ -1171,12 +1171,12 @@ activation {
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
- # or VG. See tags/hosttags. If any host tags exist but volume_list
- # is not defined, a default single-entry list containing '@*' is
- # assumed.
+ # or VG. See tags/hosttags. If any host tags exist but the volume
+ # list is not defined, a default single-entry list containing '@*'
+ # is assumed.
#
# Example
- # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
+ # read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
@@ -1808,6 +1808,11 @@ activation {
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
+
+ # Configuration option report/mark_invisible_devices.
+ # Use brackets [] to mark invisible devices.
+ # This configuration option has an automatic default value.
+ # mark_invisible_devices = 1
# }
# Configuration section dmeventd.
8 years, 3 months