Clear all autoclear feature bits for QCOW2 v3 images. These bits indicate features that can be safely disabled when modified by software that doesn't understand them.
(
&mut self,
file: &mut F,
)
| 569 | /// These bits indicate features that can be safely disabled when modified |
| 570 | /// by software that doesn't understand them. |
| 571 | pub fn clear_autoclear_features<F: Seek + Write + FileSync>( |
| 572 | &mut self, |
| 573 | file: &mut F, |
| 574 | ) -> Result<()> { |
| 575 | if self.version == 3 && self.autoclear_features != 0 { |
| 576 | self.autoclear_features = 0; |
| 577 | file.seek(SeekFrom::Start(AUTOCLEAR_FEATURES_OFFSET)) |
| 578 | .map_err(Error::WritingHeader)?; |
| 579 | u64::write_be(file, 0).map_err(Error::WritingHeader)?; |
| 580 | file.fsync().map_err(Error::SyncingHeader)?; |
| 581 | } |
| 582 | Ok(()) |
| 583 | } |
| 584 | } |
| 585 | |
| 586 | pub(super) fn max_refcount_clusters( |
no test coverage detected