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
diff --git a/ext4_utils/allocate.h b/ext4_utils/allocate.h
index a0999e4..5c26792 100644
--- a/ext4_utils/allocate.h
+++ b/ext4_utils/allocate.h
@@ -21,7 +21,22 @@
 
 #include "ext4_utils.h"
 
-struct block_allocation;
+struct region;
+
+struct region_list {
+	struct region *first;
+	struct region *last;
+	struct region *iter;
+	u32 partial_iter;
+};
+
+struct block_allocation {
+	struct region_list list;
+	struct region_list oob_list;
+	char* filename;
+	struct block_allocation* next;
+};
+
 
 void block_allocator_init();
 void block_allocator_free();
@@ -54,5 +69,6 @@
 	u32 block, u32 len, int bg);
 struct block_allocation *create_allocation();
 int append_oob_allocation(struct block_allocation *alloc, u32 len);
+void print_blocks(FILE* f, struct block_allocation *alloc);
 
 #endif