Flush the refcount table that keeps the address of the refcounts blocks. Returns true if the table changed since the previous `flush_table()` call.
(&mut self, raw_file: &mut QcowRawFile)
| 184 | /// Flush the refcount table that keeps the address of the refcounts blocks. |
| 185 | /// Returns true if the table changed since the previous `flush_table()` call. |
| 186 | pub fn flush_table(&mut self, raw_file: &mut QcowRawFile) -> io::Result<bool> { |
| 187 | if self.ref_table.dirty() { |
| 188 | raw_file |
| 189 | .write_pointer_table_direct(self.refcount_table_offset, self.ref_table.iter())?; |
| 190 | self.ref_table.mark_clean(); |
| 191 | Ok(true) |
| 192 | } else { |
| 193 | Ok(false) |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | /// Gets the refcount for a cluster with the given address. |
| 198 | pub fn get_cluster_refcount( |
no test coverage detected