mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
vm-virtio: block: Ensure that VIRTIO_BLK_T_FLUSH requests actually sync
The implementation of this virtio block (and vhost-user block) command called a function that was a no-op on Linux. Use the same function as virtio-pmem to ensure that data is not lost when the guest asks for it to be flused to disk. Fixes: #399 Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
ca6edafbfe
commit
3947809c36
@ -351,7 +351,7 @@ impl Write for RawFile {
|
||||
}
|
||||
|
||||
fn flush(&mut self) -> std::io::Result<()> {
|
||||
self.file.flush()
|
||||
self.file.sync_all()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user