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

Method round_down

block/src/qcow/raw_file.rs:74–77  ·  view source on GitHub ↗
(&self, offset: u64)

Source from the content-addressed store, hash-verified

72 }
73
74 fn round_down(&self, offset: u64) -> u64 {
75 let align: u64 = self.alignment.try_into().unwrap();
76 (offset / align) * align
77 }
78
79 fn is_aligned(&self, buf: &[u8]) -> bool {
80 if self.alignment == 0 {

Callers 2

readMethod · 0.80
writeMethod · 0.80

Calls 1

try_intoMethod · 0.80

Tested by

no test coverage detected