aboutsummaryrefslogtreecommitdiff
path: root/include/blkmap.h
diff options
context:
space:
mode:
authorTobias Waldekranz2023-02-16 16:33:51 +0100
committerTom Rini2023-04-05 10:54:47 -0400
commit762dc78bdea3468e8cd35c01f91def13974948f1 (patch)
tree4bae2048970ae039b9a1f65ad527aafc48cdf31c /include/blkmap.h
parent15d9e99a274df5d9b260f75f42f7c394e5fe0e42 (diff)
blk: blkmap: Add linear device mapping support
Allow a slice of an existing block device to be mapped to a blkmap. This means that filesystems that are not stored at exact partition boundaries can be accessed by remapping a slice of the existing device to a blkmap device. Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/blkmap.h')
-rw-r--r--include/blkmap.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/blkmap.h b/include/blkmap.h
index 74baeb19f81..af54583c7dd 100644
--- a/include/blkmap.h
+++ b/include/blkmap.h
@@ -8,6 +8,19 @@
#define _BLKMAP_H
/**
+ * blkmap_map_linear() - Map region of other block device
+ *
+ * @dev: Blkmap to create the mapping on
+ * @blknr: Start block number of the mapping
+ * @blkcnt: Number of blocks to map
+ * @lblk: The target block device of the mapping
+ * @lblknr: The start block number of the target device
+ * Returns: 0 on success, negative error code on failure
+ */
+int blkmap_map_linear(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
+ struct udevice *lblk, lbaint_t lblknr);
+
+/**
* blkmap_map_mem() - Map region of memory
*
* @dev: Blkmap to create the mapping on