[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/48] block: Make backing files always writeback
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 05/48] block: Make backing files always writeback |
Date: |
Tue, 29 Mar 2016 17:08:05 +0200 |
First of all, we're generally not writing to backing files, but when we
do, it's in the context of block jobs which know very well when to flush
the image.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
block.c | 5 +++--
tests/qemu-iotests/142.out | 10 +++++-----
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/block.c b/block.c
index 6592b35..5da7bb2 100644
--- a/block.c
+++ b/block.c
@@ -737,8 +737,9 @@ static void bdrv_backing_options(int *child_flags, QDict
*child_options,
{
int flags = parent_flags;
- /* The cache mode is inherited unmodified for backing files */
- qdict_copy_default(child_options, parent_options, BDRV_OPT_CACHE_WB);
+ /* The cache mode is inherited unmodified for backing files; except WCE,
+ * which is only applied on the top level (BlockBackend) */
+ qdict_set_default_str(child_options, BDRV_OPT_CACHE_WB, "on");
qdict_copy_default(child_options, parent_options, BDRV_OPT_CACHE_DIRECT);
qdict_copy_default(child_options, parent_options, BDRV_OPT_CACHE_NO_FLUSH);
diff --git a/tests/qemu-iotests/142.out b/tests/qemu-iotests/142.out
index b555d5a..abe94c3 100644
--- a/tests/qemu-iotests/142.out
+++ b/tests/qemu-iotests/142.out
@@ -62,7 +62,7 @@ cache.direct=on on backing-file
cache.writeback=off on none0
Cache mode: writethrough
Cache mode: writeback
- Cache mode: writethrough
+ Cache mode: writeback
Cache mode: writeback
cache.writeback=off on file
@@ -143,7 +143,7 @@ cache.writeback=off on none0
Cache mode: writethrough
Cache mode: writethrough
Cache mode: writeback
- Cache mode: writethrough
+ Cache mode: writeback
Cache mode: writeback
cache.writeback=off on file
@@ -302,7 +302,7 @@ cache.direct=on on backing-file
cache.writeback=off on none0
Cache mode: writethrough, direct
Cache mode: writeback, direct
- Cache mode: writethrough, direct
+ Cache mode: writeback, direct
Cache mode: writeback, direct
cache.writeback=off on file
@@ -383,7 +383,7 @@ cache.writeback=off on none0
Cache mode: writeback, direct
Cache mode: writethrough
Cache mode: writeback
- Cache mode: writethrough
+ Cache mode: writeback
Cache mode: writeback
cache.writeback=off on file
@@ -718,7 +718,7 @@ cache.direct=on on backing-file
cache.writeback=off on none0
Cache mode: writethrough
Cache mode: writeback
- Cache mode: writethrough, direct
+ Cache mode: writeback, direct
Cache mode: writeback, direct
cache.writeback=off on file
--
1.8.3.1
- [Qemu-devel] [PULL 00/48] Block layer patches, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 01/48] block: Remove bdrv_make_anon(), Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 04/48] block: Remove cache.writeback from blockdev-add, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 02/48] block: Remove copy-on-read from bdrv_move_feature_fields(), Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 03/48] block: Remove dirty bitmaps from bdrv_move_feature_fields(), Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 05/48] block: Make backing files always writeback,
Kevin Wolf <=
- [Qemu-devel] [PULL 09/48] block/qapi: make two printf() formats literal, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 11/48] block/qapi: Set s->device in bdrv_query_stats(), Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 08/48] block: Remove blk_set_bs(), Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 07/48] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 06/48] block: Reject writethrough mode except at the root, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 10/48] block/qapi: fix unbounded stack for dump_qdict, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 14/48] qemu-img/qemu-io: don't prompt for passwords if not required, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 12/48] block/qapi: Pass bdrv_query_blk_stats() s->stats, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 13/48] block: add flag to indicate that no I/O will be performed, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 15/48] tests: redirect stderr to stdout for iotests, Kevin Wolf, 2016/03/29