summaryrefslogtreecommitdiff
path: root/drivers/md/dm-thin-metadata.h
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2015-04-16 12:47:21 +0100
committerMike Snitzer <snitzer@redhat.com>2015-06-11 17:13:03 -0400
commita5d895a90bf57e5fe87edf48dd1852e7292d570d (patch)
tree9ac33ffeca4546e80c4975dc41f320b7519661f8 /drivers/md/dm-thin-metadata.h
parent4ec331c3ea7ec94f28aa1c62a279cfa1cfe3c91b (diff)
dm thin metadata: add dm_thin_find_mapped_range()
Retrieve the next run of contiguously mapped blocks. Useful for working out where to break up IO. Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-thin-metadata.h')
-rw-r--r--drivers/md/dm-thin-metadata.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/md/dm-thin-metadata.h b/drivers/md/dm-thin-metadata.h
index fac01a96d303..f11f14095b93 100644
--- a/drivers/md/dm-thin-metadata.h
+++ b/drivers/md/dm-thin-metadata.h
@@ -147,6 +147,15 @@ int dm_thin_find_block(struct dm_thin_device *td, dm_block_t block,
int can_issue_io, struct dm_thin_lookup_result *result);
/*
+ * Retrieve the next run of contiguously mapped blocks. Useful for working
+ * out where to break up IO. Returns 0 on success, < 0 on error.
+ */
+int dm_thin_find_mapped_range(struct dm_thin_device *td,
+ dm_block_t begin, dm_block_t end,
+ dm_block_t *thin_begin, dm_block_t *thin_end,
+ dm_block_t *pool_begin, bool *maybe_shared);
+
+/*
* Obtain an unused block.
*/
int dm_pool_alloc_data_block(struct dm_pool_metadata *pmd, dm_block_t *result);