diff options
author | Doug Zongker <dougz@google.com> | 2014-08-12 11:35:37 -0700 |
---|---|---|
committer | Doug Zongker <dougz@google.com> | 2014-08-12 16:05:53 -0700 |
commit | bec598e982301bf2714d37b14e312c9845c7cc0c (patch) | |
tree | 975b689f83d24cad7dba7f29d5439f5bd9c85a11 /ext4_utils/extent.c | |
parent | 3776fefb4b35a46f8298821b1914e7e695e7219a (diff) | |
download | extras-bec598e982301bf2714d37b14e312c9845c7cc0c.tar.gz |
add option to make_ext4fs to record blocks for each file
Add the -B option to make_ext4fs, which causes it to record the block
ranges used for each (regular) file in the image. We can use this
information to construct more efficient block-based incremental OTAs.
Bug: 16984795
Change-Id: I2a5325bb89948f63c76e93fdfa84c51f9b050104
Diffstat (limited to 'ext4_utils/extent.c')
-rw-r--r-- | ext4_utils/extent.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext4_utils/extent.c b/ext4_utils/extent.c index abb30ce4..7142c8bb 100644 --- a/ext4_utils/extent.c +++ b/ext4_utils/extent.c @@ -202,7 +202,7 @@ u8 *inode_allocate_data_extents(struct ext4_inode *inode, u64 len, /* Allocates enough blocks to hold len bytes, queues them to be written from a file, and connects them to an inode. */ -void inode_allocate_file_extents(struct ext4_inode *inode, u64 len, +struct block_allocation* inode_allocate_file_extents(struct ext4_inode *inode, u64 len, const char *filename) { struct block_allocation *alloc; @@ -214,8 +214,7 @@ void inode_allocate_file_extents(struct ext4_inode *inode, u64 len, } extent_create_backing_file(alloc, len, filename); - - free_alloc(alloc); + return alloc; } /* Allocates enough blocks to hold len bytes and connects them to an inode */ |