Skip to contentSkip to conversation

master - dumpconfig: honour --atversion with --type profilable

PATCH Peter Rajnoha 1 participant 1 message Jul 9, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=934616d4c759cd1dfe2b359fc83632999daf1ce8
Commit:        934616d4c759cd1dfe2b359fc83632999daf1ce8
Parent:        953a438e93a1adb0df7c7931cd6271b9d32acd7d
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Tue Jul 9 10:23:46 2013 +0200
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Tue Jul 9 10:23:46 2013 +0200

dumpconfig: honour --atversion with --type profilable

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
}

raw/~ $ lvm dumpconfig --type profilable --atversion 2.2.90 activation {
thin_pool_autoextend_threshold=100 thin_pool_autoextend_percent=20
}

---
 lib/config/config.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
lib/config/config.c +2 -1
index 7c4f8ba..e18e623 100644
@@ -1371,7 +1371,8 @@ static int _should_skip_def_node(struct config_def_tree_spec *spec, int section_
 				return 1;
 			break;
 		case CFG_DEF_TREE_PROFILABLE:
-			if (!(def->flags & CFG_PROFILABLE))
+			if (!(def->flags & CFG_PROFILABLE) ||
+			    (def->since_version > spec->version))
 				return 1;
 			break;
 		default: