Skip to contentSkip to conversation

master - thin: move update_pool_params

PATCH Zdenek Kabelac 1 participant 1 message Mar 13, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b36a776a7fed84fa6228ffa287b4c9ccdf355ddf
Commit:        b36a776a7fed84fa6228ffa287b4c9ccdf355ddf
Parent:        f06dd8725a85d344820eda91835c58f489097563
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Mar 11 12:37:09 2013 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed Mar 13 15:13:54 2013 +0100

thin: move update_pool_params

Now we may recongnize preset arguments, move
the code for updating thin pool related values
into /lib portion of the code.

---
 WHATS_NEW                        |    1 +
 lib/metadata/metadata-exported.h |    4 ++
 lib/metadata/thin_manip.c        |   88 ++++++++++++++++++++++++++++++++++++++
 tools/toollib.c                  |   87 -------------------------------------
 tools/toollib.h                  |    5 +--
 5 files changed, 94 insertions(+), 91 deletions(-)
WHATS_NEW +1 -0
index 082b414..68a7d03 100644
@@ -1,5 +1,6 @@
 Version 2.02.99 - 
 ===================================
+  Move update_pool_params() from /tools to /lib for better reuse.
   Give precedence to EMC power2 devices with duplicate PVIDs.
   Add --validate option to lvm dumpconfig to validate current config on demand.
   Add --ignoreadvanced and --ignoreunsupported switch to lvm dumpconfig.
lib/metadata/metadata-exported.h +4 -0
index 5ed8f3e..c2728d5 100644
@@ -576,6 +576,10 @@ uint64_t extents_from_size(struct cmd_context *cmd, uint64_t size,
 
 int pool_is_active(const struct logical_volume *pool_lv);
 int update_pool_lv(struct logical_volume *lv, int activate);
+int update_pool_params(struct cmd_context *cmd, unsigned attr, int passed_args,
+		       uint32_t data_extents, uint32_t extent_size,
+		       uint32_t *chunk_size, thin_discards_t *discards,
+		       uint64_t *pool_metadata_size);
 int get_pool_discards(const char *str, thin_discards_t *discards);
 const char *get_pool_discards_name(thin_discards_t discards);
 
lib/metadata/thin_manip.c +88 -0

100 lines not on this page · raw message

tools/toollib.c +0 -87

93 lines not on this page · raw message

tools/toollib.h +1 -4
index 9a4743d..2ca7951 100644
@@ -117,10 +117,7 @@ int get_pool_params(struct cmd_context *cmd, int *passed_args,
 		    thin_discards_t *discards,
 		    uint64_t *pool_metadata_size,
 		    int *zero);
-int update_pool_params(struct cmd_context *cmd, unsigned attr, int passed_args,
-		       uint32_t data_extents, uint32_t extent_size,
-		       uint32_t *chunk_size, thin_discards_t *discards,
-		       uint64_t *pool_metadata_size);
+
 struct logical_volume *alloc_pool_metadata(struct logical_volume *pool_lv,
 					   alloc_policy_t alloc, const char *name,
 					   struct dm_list *pvh, uint32_t read_ahead,