Allocate and initialize a new data cluster. Returns the offset of the cluster into the file on success.
(&mut self, initial_data: Option<Vec<u8>>)
| 1620 | // Allocate and initialize a new data cluster. Returns the offset of the |
| 1621 | // cluster into the file on success. |
| 1622 | fn append_data_cluster(&mut self, initial_data: Option<Vec<u8>>) -> std::io::Result<u64> { |
| 1623 | let new_addr: u64 = self.get_new_cluster(initial_data)?; |
| 1624 | // The cluster refcount starts at one indicating it is used but doesn't need COW. |
| 1625 | self.set_cluster_refcount_track_freed(new_addr, 1)?; |
| 1626 | Ok(new_addr) |
| 1627 | } |
| 1628 | |
| 1629 | // Returns true if the cluster containing `address` is already allocated. |
| 1630 | fn cluster_allocated(&mut self, address: u64) -> std::io::Result<bool> { |
no test coverage detected