Skip to contentSkip to conversation

master - thin: validate unused thin pool

PATCH Zdenek Kabelac 1 participant 1 message Nov 4, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6116b1d6e302097086c9dcd418e4404ddd337939
Commit:        6116b1d6e302097086c9dcd418e4404ddd337939
Parent:        ee627884de95ae5a40f0fc2534dcd60e63e2a58d
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Tue Nov 4 15:06:55 2014 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Nov 4 15:28:00 2014 +0100

thin: validate unused thin pool

Function tests, that given new thin pool is still unused.

---
 lib/metadata/metadata.h   |    3 ++
 lib/metadata/thin_manip.c |   52 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 0 deletions(-)
lib/metadata/metadata.h +3 -0
index 1dd8867..48c1b3c 100644
@@ -389,6 +389,9 @@ struct lv_segment *find_pool_seg(const struct lv_segment *seg);
 /* Find some unused device_id for thin pool LV segment. */
 uint32_t get_free_pool_device_id(struct lv_segment *thin_pool_seg);
 
+/* Check if the new thin-pool could be used for lvm2 thin volumes */
+int check_new_thin_pool(const struct logical_volume *pool_lv);
+
 /*
  * Remove a dev_dir if present.
  */
lib/metadata/thin_manip.c +52 -0

55 lines not on this page · raw message