mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cleanup: rename 'invisible devices' to 'hidden devices'
This commit is contained in:
parent
d2d5c5e6c9
commit
1417ed304b
@ -1,7 +1,7 @@
|
|||||||
Version 2.02.140 -
|
Version 2.02.140 -
|
||||||
===================================
|
===================================
|
||||||
Add report/mark_invisible_devices to lvm.conf.
|
Add report/mark_hidden_devices to lvm.conf.
|
||||||
Use brackets consistently in report fields to mark invisible devices.
|
Use brackets consistently in report fields to mark hidden devices.
|
||||||
Restore background polling processing during auto-activation (2.02.119).
|
Restore background polling processing during auto-activation (2.02.119).
|
||||||
Fix invalid memory read when reporting cache LV policy_name (2.02.126).
|
Fix invalid memory read when reporting cache LV policy_name (2.02.126).
|
||||||
|
|
||||||
|
@ -1809,10 +1809,10 @@ activation {
|
|||||||
# This configuration option has an automatic default value.
|
# 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"
|
# 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.
|
# Configuration option report/mark_hidden_devices.
|
||||||
# Use brackets [] to mark invisible devices.
|
# Use brackets [] to mark hidden devices.
|
||||||
# This configuration option has an automatic default value.
|
# This configuration option has an automatic default value.
|
||||||
# mark_invisible_devices = 1
|
# mark_hidden_devices = 1
|
||||||
# }
|
# }
|
||||||
|
|
||||||
# Configuration section dmeventd.
|
# Configuration section dmeventd.
|
||||||
|
@ -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->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_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->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);
|
cmd->report_list_item_separator = find_config_tree_str(cmd, report_list_item_separator_CFG, NULL);
|
||||||
if (!(cmd->time_format = _set_time_format(cmd)))
|
if (!(cmd->time_format = _set_time_format(cmd)))
|
||||||
|
@ -121,7 +121,7 @@ struct cmd_context {
|
|||||||
unsigned auto_set_activation_skip:1;
|
unsigned auto_set_activation_skip:1;
|
||||||
unsigned si_unit_consistency:1;
|
unsigned si_unit_consistency:1;
|
||||||
unsigned report_binary_values_as_numeric: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 metadata_read_only:1;
|
||||||
unsigned ignore_clustered_vgs:1;
|
unsigned ignore_clustered_vgs:1;
|
||||||
unsigned threaded:1; /* set if running within a thread e.g. clvmd */
|
unsigned threaded:1; /* set if running within a thread e.g. clvmd */
|
||||||
|
@ -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"
|
"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")
|
"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,
|
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 invisible devices.\n")
|
"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,
|
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"
|
"The library dmeventd uses when monitoring a mirror device.\n"
|
||||||
|
@ -30,7 +30,7 @@ static int _utsinit = 0;
|
|||||||
|
|
||||||
static char *_format_pvsegs(struct dm_pool *mem, const struct lv_segment *seg,
|
static char *_format_pvsegs(struct dm_pool *mem, const struct lv_segment *seg,
|
||||||
int range_format, int metadata_areas_only,
|
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";
|
static const char pool_grow_object_failed_msg[] = "dm_pool_grow_object failed";
|
||||||
unsigned int s;
|
unsigned int s;
|
||||||
@ -72,7 +72,7 @@ static char *_format_pvsegs(struct dm_pool *mem, const struct lv_segment *seg,
|
|||||||
return NULL;
|
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);
|
log_error(pool_grow_object_failed_msg);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ static char *_format_pvsegs(struct dm_pool *mem, const struct lv_segment *seg,
|
|||||||
return NULL;
|
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);
|
log_error(pool_grow_object_failed_msg);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -129,22 +129,22 @@ out:
|
|||||||
|
|
||||||
char *lvseg_devices(struct dm_pool *mem, const struct lv_segment *seg)
|
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)
|
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)
|
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)
|
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)
|
char *lvseg_tags_dup(const struct lv_segment *seg)
|
||||||
|
@ -1586,7 +1586,7 @@ static int _lvname_disp(struct dm_report *rh, struct dm_pool *mem,
|
|||||||
char *repstr, *lvname;
|
char *repstr, *lvname;
|
||||||
size_t len;
|
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);
|
return _string_disp(rh, mem, field, &lv->name, private);
|
||||||
|
|
||||||
len = strlen(lv->name) + 3;
|
len = strlen(lv->name) + 3;
|
||||||
|
@ -20,7 +20,7 @@ lvcreate --type mirror -m1 -l1 --alloc anywhere -n $lv1 $vg
|
|||||||
|
|
||||||
aux lvmconf 'log/prefix=""'
|
aux lvmconf 'log/prefix=""'
|
||||||
|
|
||||||
aux lvmconf "report/mark_invisible_devices = 0"
|
aux lvmconf "report/mark_hidden_devices = 0"
|
||||||
lvs --noheadings -a -o name $vg > out
|
lvs --noheadings -a -o name $vg > out
|
||||||
grep "^${lv1}_mimage_0" out
|
grep "^${lv1}_mimage_0" out
|
||||||
not grep "^\[${lv1}_mimage_0\]" out
|
not grep "^\[${lv1}_mimage_0\]" out
|
||||||
@ -28,7 +28,7 @@ lvs --noheadings -a -o devices $vg/$lv1 > out
|
|||||||
grep "^${lv1}_mimage_0" out
|
grep "^${lv1}_mimage_0" out
|
||||||
not grep "^\[${lv1}_mimage_0\]" out
|
not grep "^\[${lv1}_mimage_0\]" out
|
||||||
|
|
||||||
aux lvmconf "report/mark_invisible_devices = 1"
|
aux lvmconf "report/mark_hidden_devices = 1"
|
||||||
lvs --noheadings -a -o name $vg > out
|
lvs --noheadings -a -o name $vg > out
|
||||||
grep "^\[${lv1}_mimage_0\]" out
|
grep "^\[${lv1}_mimage_0\]" out
|
||||||
not grep "^${lv1}_mimage_0" out
|
not grep "^${lv1}_mimage_0" out
|
Loading…
Reference in New Issue
Block a user