[space_map (rust)] Fix space map building
- Fix out-of-bounds index - Automatically flush queued writes before function return - Track allocated blocks in write_batcher (might be space consuming)
This commit is contained in:
@@ -126,6 +126,7 @@ pub fn write_metadata_sm(w: &mut WriteBatcher, sm: &dyn SpaceMap) -> Result<SMRo
|
||||
metadata_index.pack(&mut cur)?;
|
||||
let loc = bitmap_root.loc;
|
||||
w.write(bitmap_root, checksum::BT::INDEX)?;
|
||||
w.flush()?;
|
||||
|
||||
Ok(SMRoot {
|
||||
nr_blocks: sm.get_nr_blocks()?,
|
||||
|
||||
Reference in New Issue
Block a user