master - dumpconfig: add --type profilable
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=953a438e93a1adb0df7c7931cd6271b9d32acd7d Commit: 953a438e93a1adb0df7c7931cd6271b9d32acd7d Parent: f56a1819e90900487d6d58485dd658944922f251 Author: Peter Rajnoha <[email protected]> AuthorDate: Tue Jul 9 09:57:46 2013 +0200 Committer: Peter Rajnoha <[email protected]> CommitterDate: Tue Jul 9 10:00:47 2013 +0200
dumpconfig: add --type profilable
The --type profilable shows all config settings that are customizable by profiles:
raw/~ $ lvm dumpconfig --type profilable
allocation {
thin_pool_zero=1
thin_pool_discards="passdown"
thin_pool_chunk_size=64
}
activation {
thin_pool_autoextend_threshold=100
thin_pool_autoextend_percent=20
}
---
WHATS_NEW | 1 +
lib/config/config.c | 4 ++++
lib/config/config.h | 3 ++-
tools/commands.h | 2 +-
tools/dumpconfig.c | 4 ++++
5 files changed, 12 insertions(+), 2 deletions(-)WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Add --type profilable to lvm dumpconfig to show profilable config settings. Add --mergedconfig to lvm dumpconfig for merged --config/--profile/lvm.conf. Relase memory and unblock signals in lock_vol error path. Define LVM2_* command errors in lvm2cmd.h and use in dmeventd plugins.
lib/config/config.c +4 -0
@@ -1370,6 +1370,10 @@ static int _should_skip_def_node(struct config_def_tree_spec *spec, int section_if (def->since_version != spec->version)return 1 ;break ; +case CFG_DEF_TREE_PROFILABLE : +if (!(def->flags &CFG_PROFILABLE )) +return 1 ; +break ;default :if (def->since_version > spec->version)return 1 ;
lib/config/config.h +2 -1
@@ -101,7 +101,8 @@ typedef enum {CFG_DEF_TREE_MISSING ,/* tree of nodes missing in current config using default values */ CFG_DEF_TREE_COMPLETE ,/* CURRENT + MISSING, the tree actually used within execution, not implemented yet */ CFG_DEF_TREE_DEFAULT ,/* tree of all possible config nodes with default values */ - CFG_DEF_TREE_NEW /* tree of all new nodes that appeared in given version */ +CFG_DEF_TREE_NEW ,/* tree of all new nodes that appeared in given version */ + CFG_DEF_TREE_PROFILABLE /* tree of all nodes that are customizable by profiles */ } cfg_def_tree_t;/* configuration definition tree specification */
tools/commands.h +1 -1
@@ -33,7 +33,7 @@ xx(dumpconfig,PERMITTED_READ_ONLY ,"dumpconfig\n" "\t[-f|--file filename] \n" -"\t[--type {current|default|missing|new} \n" +"\t[--type {current|default|missing|new|profilable} \n" "\t[--withcomments] \n" "\t[--withversions] \n" "\t[--ignoreadvanced] \n"
tools/dumpconfig.c +4 -0
@@ -182,6 +182,10 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv) tree_spec.type =CFG_DEF_TREE_NEW ;/* new type does not require check status */ } +else if (!strcmp (type,"profilable" )) { + tree_spec.type =CFG_DEF_TREE_PROFILABLE ; +/* profilable type does not require check status */ + }else {log_error ("Incorrect type of configuration specified. " "Expected one of: current, default, missing, new." );