aboutsummaryrefslogtreecommitdiff
path: root/block_int.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2011-11-10 18:10:11 +0100
committerKevin Wolf <kwolf@redhat.com>2011-11-11 14:02:59 +0100
commiteb489bb1eceea0d710cd5f5122d37213300ceef6 (patch)
treea4f6ea0374bdd83c83ebe7391c56211c7190ed71 /block_int.h
parentc68b89acd636ff545bc7cb92739c41999291ce3c (diff)
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>
Diffstat (limited to 'block_int.h')
-rw-r--r--block_int.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h
index 5aadc1fcee..1ec4921cc6 100644
--- a/block_int.h
+++ b/block_int.h
@@ -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,