my personal preference is also to have 2 functions: `write_to_metadata_mmaps` and `write_to_posting_list_mmaps`, that internally just calls this function. It's extra, but it makes things easy to re...
for readability, create 2 functions:
```
fn new_metadata_backing_file(&mut self);
fn new_posting_list_backing_file(&mut self);
```
Each of them will call `self.new_backfing_file({true, false...
put the output at the end. change `offset` to `total_length` (which is how I understand this code). Change `backing_file_size` to `individual_backing_file_size`
```suggestion
fn write_all_m...
I think it might be worth it if you create a struct like this:
```
struct MMapsInfo {
pub mmaps: Vec<...>,
pub current_overall_offset: usize,
}
```
then, in
```
struct FileBacke...
I feel like the logic to extract information from both metadata and posting list files are the same. Maybe there is a way to reuse the code here?
* Get the overall offset
* From the overall offset,...