mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
block: Introduce bdrv_co_flush_to_os
qcow2 has a writeback metadata cache, so flushing a qcow2 image actually consists of writing back that cache to the protocol and only then flushes the protocol in order to get everything stable on disk. This introduces a separate bdrv_co_flush_to_os to reflect the split. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
@@ -93,6 +93,13 @@ struct BlockDriver {
|
||||
*/
|
||||
int coroutine_fn (*bdrv_co_flush_to_disk)(BlockDriverState *bs);
|
||||
|
||||
/*
|
||||
* Flushes all internal caches to the OS. The data may still sit in a
|
||||
* writeback cache of the host OS, but it will survive a crash of the qemu
|
||||
* process.
|
||||
*/
|
||||
int coroutine_fn (*bdrv_co_flush_to_os)(BlockDriverState *bs);
|
||||
|
||||
int (*bdrv_aio_multiwrite)(BlockDriverState *bs, BlockRequest *reqs,
|
||||
int num_reqs);
|
||||
int (*bdrv_merge_requests)(BlockDriverState *bs, BlockRequest* a,
|
||||
|
||||
Reference in New Issue
Block a user