MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / append_data_cluster

Method append_data_cluster

block/src/qcow/metadata.rs:680–684  ·  view source on GitHub ↗

Allocates a data cluster and sets its refcount to 1.

(&mut self, initial_data: Option<Vec<u8>>)

Source from the content-addressed store, hash-verified

678
679 /// Allocates a data cluster and sets its refcount to 1.
680 fn append_data_cluster(&mut self, initial_data: Option<Vec<u8>>) -> io::Result<u64> {
681 let new_addr = self.get_new_cluster(initial_data)?;
682 self.set_cluster_refcount_track_freed(new_addr, 1)?;
683 Ok(new_addr)
684 }
685
686 /// Updates the L1 and L2 tables to point to a new cluster address.
687 fn update_cluster_addr(

Callers 1

map_writeMethod · 0.45

Calls 2

get_new_clusterMethod · 0.45

Tested by

no test coverage detected