Skip to contentSkip to conversation

LVM2/libdm libdevmapper.h libdm-deptree.c

PATCH [email protected] 1 participant 1 message Dec 21, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-12-21 12:52:38

Modified files:
libdm : libdevmapper.h libdm-deptree.c

Log message:
Add Thin API for parsing thin status

Add dm_get_status_thin_pool and dm_get_status_thin functions to parse 'params' argument which is received via dm_get_next_target.

Returns filed structure allocated from given mempool.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdevmapper.h.diff?cvsroot=lvm2&r1=1.172&r2=1.173
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-deptree.c.diff?cvsroot=lvm2&r1=1.146&r2=1.147

libdm/libdevmapper.h +23 -0
@@ -238,6 +238,29 @@
 			 void *next, uint64_t *start, uint64_t *length,
 			 char **target_type, char **params);
 
+/* Parse params from STATUS call for thin_pool target */
+struct dm_pool;
+
+struct dm_status_thin_pool {
+	uint64_t transaction_id;
+	uint64_t used_meta_blocks;
+	uint64_t total_meta_blocks;
+	uint64_t used_data_blocks;
+	uint64_t total_data_blocks;
+};
+
+int dm_get_status_thin_pool(struct dm_pool *mem, const char *params,
+			    struct dm_status_thin_pool **status);
+
+/* Parse params from STATUS call for thin target */
+struct dm_status_thin {
+	uint64_t mapped_sectors;
+	uint64_t highest_mapped_sector;
+};
+
+int dm_get_status_thin(struct dm_pool *mem, const char *params,
+		       struct dm_status_thin **status);
+
 /*
  * Call this to actually run the ioctl.
  */
libdm/libdm-deptree.c +48 -0

54 lines not on this page · raw message