Return a block ID not ID in the data area.
(&mut self)
| 128 | |
| 129 | /// Return a block ID not ID in the data area. |
| 130 | pub fn alloc_data(&mut self) -> u32 { |
| 131 | self.data_bitmap.alloc(&self.block_device).unwrap() as u32 + self.data_area_start_block |
| 132 | } |
| 133 | |
| 134 | pub fn dealloc_data(&mut self, block_id: u32) { |
| 135 | get_block_cache(block_id as usize, Arc::clone(&self.block_device)) |