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

Method set_writeback_mode

virtio-devices/src/block.rs:1001–1008  ·  view source on GitHub ↗
(&mut self, enabled: bool)

Source from the content-addressed store, hash-verified

999 }
1000
1001 fn set_writeback_mode(&mut self, enabled: bool) {
1002 self.config.writeback = enabled as u8;
1003 self.writeback.store(enabled, Ordering::Release);
1004 info!(
1005 "Changing cache mode to {}",
1006 if enabled { "writeback" } else { "writethrough" }
1007 );
1008 }
1009
1010 pub fn resize(&mut self, new_size: u64) -> Result<()> {
1011 if !new_size.is_multiple_of(SECTOR_SIZE) {

Callers 3

write_configMethod · 0.80
activateMethod · 0.80
resetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected