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
1 changed files with 1 additions and 1 deletions
|
|
@ -351,7 +351,7 @@ impl Write for RawFile {
|
|||
}
|
||||
|
||||
fn flush(&mut self) -> std::io::Result<()> {
|
||||
self.file.flush()
|
||||
self.file.sync_all()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue