diff options
author | Kevin Wolf <kwolf@redhat.com> | 2011-07-19 13:01:48 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-07-19 15:39:22 +0200 |
commit | 93913dfd8acbaddc8ef3716cd7b8a2830c99cb19 (patch) | |
tree | 4bec586c8b3b30c6ab432fe1237070cfa9a93428 /block/qcow2.h | |
parent | 4a1d5e1fded54358ddc4d8cbd53388ca7c93499b (diff) |
qcow2: Use Qcow2Cache in writeback mode during loadvm/savevm
In snapshotting there is no guest involved, so we can safely use a writeback
mode and do the flushes in the right place (i.e. at the very end). This
improves the time that creating/restoring an internal snapshot takes with an
image in writethrough mode.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r-- | block/qcow2.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/qcow2.h b/block/qcow2.h index e1ae3e8c2b..6a0a21b694 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -228,6 +228,8 @@ int qcow2_read_snapshots(BlockDriverState *bs); Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int num_tables, bool writethrough); int qcow2_cache_destroy(BlockDriverState* bs, Qcow2Cache *c); +bool qcow2_cache_set_writethrough(BlockDriverState *bs, Qcow2Cache *c, + bool enable); void qcow2_cache_entry_mark_dirty(Qcow2Cache *c, void *table); int qcow2_cache_flush(BlockDriverState *bs, Qcow2Cache *c); |