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

Method apply_dealloc_action

block/src/qcow_async.rs:85–103  ·  view source on GitHub ↗
(&mut self, action: &DeallocAction)

Source from the content-addressed store, hash-verified

83 }
84
85 fn apply_dealloc_action(&mut self, action: &DeallocAction) {
86 match action {
87 DeallocAction::PunchHole {
88 host_offset,
89 length,
90 } => {
91 let _ = self.data_file.file_mut().punch_hole(*host_offset, *length);
92 }
93 DeallocAction::WriteZeroes {
94 host_offset,
95 length,
96 } => {
97 let _ = self
98 .data_file
99 .file_mut()
100 .write_zeroes_at(*host_offset, *length);
101 }
102 }
103 }
104}
105
106impl AsyncIo for QcowAsync {

Callers 1

punch_holeMethod · 0.80

Calls 3

file_mutMethod · 0.80
punch_holeMethod · 0.45
write_zeroes_atMethod · 0.45

Tested by

no test coverage detected