mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06: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:
parent
c68b89acd6
commit
eb489bb1ec
3 changed files with 27 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue