qemu/include/block
Kevin Wolf 73176bee99 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>
2016-03-14 16:46:43 +01:00
..
accounting.h include: Clean up includes 2016-02-23 12:43:05 +00:00
aio.h aio: Introduce aio-epoll.c 2015-11-09 09:59:47 +00:00
block_int.h block: Add "file" output parameter to block status query functions 2016-02-02 17:50:47 +01:00
block.h block: Fix snapshot=on cache modes 2016-03-14 16:46:43 +01:00
blockjob.h blockjob: Fix hang in block_job_finish_sync 2016-02-09 13:52:26 +00:00
nbd.h include: Clean up includes 2016-02-23 12:43:05 +00:00
qapi.h qmp: fill in the image field in BlockDeviceInfo 2015-04-28 15:36:09 +02:00
scsi.h typofixes - v4 2015-09-11 10:45:43 +03:00
snapshot.h include: Clean up includes 2016-02-23 12:43:05 +00:00
thread-pool.h block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
throttle-groups.h throttle: Remove throttle_group_lock/unlock() 2015-10-23 18:18:23 +02:00
write-threshold.h include: Clean up includes 2016-02-23 12:43:05 +00:00