summaryrefslogtreecommitdiffstats
path: root/libdm/libdevmapper.h
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2011-12-21 12:52:38 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2011-12-21 12:52:38 +0000
commit077c4d1a355d96bc81255ddeb068cdc401a9d548 (patch)
tree924b311cf889c98c31f0a7dad4caa32e761cb2bf /libdm/libdevmapper.h
parent61158adbcf494c4b4ce99e959df5042fd9712481 (diff)
downloadlvm2-077c4d1a355d96bc81255ddeb068cdc401a9d548.tar.gz
lvm2-077c4d1a355d96bc81255ddeb068cdc401a9d548.tar.xz
lvm2-077c4d1a355d96bc81255ddeb068cdc401a9d548.zip
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.
Diffstat (limited to 'libdm/libdevmapper.h')
-rw-r--r--libdm/libdevmapper.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 1975c349..8c282cec 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -238,6 +238,29 @@ void *dm_get_next_target(struct dm_task *dmt,
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.
*/