Struct disk::qcow::QcowFileInner
source · struct QcowFileInner {
raw_file: QcowRawFile,
header: QcowHeader,
l1_table: VecCache<u64>,
l2_entries: u64,
l2_cache: CacheMap<VecCache<u64>>,
refcounts: RefCount,
current_offset: u64,
unref_clusters: Vec<u64>,
avail_clusters: Vec<u64>,
backing_file: Option<Box<dyn DiskFile>>,
}
Fields§
§raw_file: QcowRawFile
§header: QcowHeader
§l1_table: VecCache<u64>
§l2_entries: u64
§l2_cache: CacheMap<VecCache<u64>>
§refcounts: RefCount
§current_offset: u64
§unref_clusters: Vec<u64>
§avail_clusters: Vec<u64>
§backing_file: Option<Box<dyn DiskFile>>
Implementations§
source§impl QcowFileInner
impl QcowFileInner
fn find_avail_clusters(&mut self) -> Result<(), Error>
sourcefn rebuild_refcounts(
raw_file: &mut QcowRawFile,
header: QcowHeader
) -> Result<(), Error>
fn rebuild_refcounts( raw_file: &mut QcowRawFile, header: QcowHeader ) -> Result<(), Error>
Rebuild the reference count tables.
fn limit_range_file(&self, address: u64, count: usize) -> usize
fn limit_range_cluster(&self, address: u64, count: usize) -> usize
fn virtual_size(&self) -> u64
fn l1_address_offset(&self, address: u64) -> u64
fn l1_table_index(&self, address: u64) -> u64
fn l2_table_index(&self, address: u64) -> u64
fn file_offset_read(&mut self, address: u64) -> Result<Option<u64>>
fn file_offset_write(&mut self, address: u64) -> Result<u64>
fn update_cluster_addr( &mut self, l1_index: usize, l2_index: usize, cluster_addr: u64, set_refcounts: &mut Vec<(u64, u16)> ) -> Result<()>
fn get_new_cluster(&mut self, initial_data: Option<Vec<u8>>) -> Result<u64>
fn append_data_cluster(&mut self, initial_data: Option<Vec<u8>>) -> Result<u64>
fn deallocate_cluster(&mut self, address: u64) -> Result<()>
fn zero_bytes(&mut self, address: u64, length: usize) -> Result<()>
fn read_l2_cluster( raw_file: &mut QcowRawFile, cluster_addr: u64 ) -> Result<Vec<u64>>
fn set_cluster_refcount( &mut self, address: u64, refcount: u16 ) -> Result<Vec<u64>>
fn sync_caches(&mut self) -> Result<()>
fn read_cb<F>(&mut self, address: u64, count: usize, cb: F) -> Result<usize>
fn write_cb<F>(&mut self, address: u64, count: usize, cb: F) -> Result<usize>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for QcowFileInner
impl Send for QcowFileInner
impl !Sync for QcowFileInner
impl Unpin for QcowFileInner
impl !UnwindSafe for QcowFileInner
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more