diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-03-07 13:02:15 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-03-14 16:46:43 +0100 |
commit | 73176bee9918a3738237b0e06eff72b497283869 (patch) | |
tree | 9128f06fff5d41f31f8b8a4750327b893fce87eb /include/block | |
parent | f86b8b584b114d68036bf576057f51caec7b94ba (diff) |
block: Fix snapshot=on cache modes
Since commit 91a097e, we end up with a somewhat weird cache mode
configuration with snapshot=on: The commit broke the cache mode
inheritance for the snapshot overlay so that it is opened as
writethrough instead of unsafe now. The following bdrv_append() call to
put it on top of the tree swaps the WCE flag with the snapshot's backing
file (i.e. the originally given file), so what we eventually get is
cache=writeback on the temporary overlay and
cache=writethrough,cache.no-flush=on on the real image file.
This patch changes things so that the temporary overlay gets
cache=unsafe again like it used to, and the real images get whatever the
user specified. This means that cache.direct is now respected even with
snapshot=on, and in the case of committing changes, the final flush is
no longer ignored except explicitly requested by the user.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/block.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h index 1c4f4d8141..3900c4d8c3 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -215,7 +215,6 @@ BdrvChild *bdrv_open_child(const char *filename, void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd); int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options, const char *bdref_key, Error **errp); -int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags, Error **errp); int bdrv_open(BlockDriverState **pbs, const char *filename, const char *reference, QDict *options, int flags, Error **errp); BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue, |