mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmcmdline: do not refresh whole cmd context if profile dropped after processing LVM cmd
We don't need to refresh whole cmd context if we drop profile after processing LVM command - just like we don't refresh cmd context when we're applying the profile. It's because profiles contain only safe subset of settings which do not require complete cmd context refresh. This patch calls process_profilable_config instead of refresh_toolcontext if there was profile applied for the LVM command only, not --config which requires toolcontext refresh. The process_profilable_config just sets proper values based on values of profilable settings, but it does not do complete reinitialization of various parts (e.g. filters, logging etc.).
This commit is contained in:
parent
76ef2d15d8
commit
57fa5d4329
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.163 -
|
Version 2.02.163 -
|
||||||
=================================
|
=================================
|
||||||
|
Do not refresh whole cmd context if profile dropped after processing LVM cmd.
|
||||||
Support straightforward lvconvert between striped and raid4 LVs.
|
Support straightforward lvconvert between striped and raid4 LVs.
|
||||||
Support straightforward lvconvert between raid1 and mirror LVs.
|
Support straightforward lvconvert between raid1 and mirror LVs.
|
||||||
Report supported conversions when asked for unsupported raid lvconvert.
|
Report supported conversions when asked for unsupported raid lvconvert.
|
||||||
|
@ -1734,10 +1734,13 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
config_profile_metadata_cft = remove_config_tree_by_source(cmd, CONFIG_PROFILE_METADATA);
|
config_profile_metadata_cft = remove_config_tree_by_source(cmd, CONFIG_PROFILE_METADATA);
|
||||||
cmd->profile_params->global_metadata_profile = NULL;
|
cmd->profile_params->global_metadata_profile = NULL;
|
||||||
|
|
||||||
if (config_string_cft || config_profile_command_cft || config_profile_metadata_cft) {
|
if (config_string_cft) {
|
||||||
/* Move this? */
|
/* Move this? */
|
||||||
if (!refresh_toolcontext(cmd))
|
if (!refresh_toolcontext(cmd))
|
||||||
stack;
|
stack;
|
||||||
|
} else if (config_profile_command_cft || config_profile_metadata_cft) {
|
||||||
|
if (!process_profilable_config(cmd))
|
||||||
|
stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == EINVALID_CMD_LINE && !cmd->is_interactive)
|
if (ret == EINVALID_CMD_LINE && !cmd->is_interactive)
|
||||||
|
Loading…
Reference in New Issue
Block a user