diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-03-04 14:28:01 +0100 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 20:01:34 -0600 |
commit | cdc4827286034b63ae84ad34f762133a698915f7 (patch) | |
tree | 3075061d8701a9a1e796372456fc40f8a60c0bbe /tests | |
parent | a0dba62b0ca3070700e713580a3c6765130d448a (diff) | |
download | hqemu-cdc4827286034b63ae84ad34f762133a698915f7.zip hqemu-cdc4827286034b63ae84ad34f762133a698915f7.tar.gz |
block: Move enable_write_cache to BB level
Whether a write cache is used or not is a decision that concerns the
user (e.g. the guest device) rather than the backend. It was already
logically part of the BB level as bdrv_move_feature_fields() always kept
it on top of the BDS tree; with this patch, the core of it (the actual
flag and the additional flushes) is also implemented there.
Direct callers of bdrv_open() must pass BDRV_O_CACHE_WB now if bs
doesn't have a BlockBackend attached.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/qemu-iotests/142 | 4 | ||||
-rw-r--r-- | tests/qemu-iotests/142.out | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/qemu-iotests/142 b/tests/qemu-iotests/142 index 80834b5..517fb30 100755 --- a/tests/qemu-iotests/142 +++ b/tests/qemu-iotests/142 @@ -338,8 +338,8 @@ echo # TODO Implement node-name support for 'qemu-io' HMP command for -c # Can use only -o to access child node options for now -hmp_cmds="qemu-io none0 \"reopen -o file.cache.writeback=off,file.cache.direct=off,file.cache.no-flush=off\" -qemu-io none0 \"reopen -o backing.file.cache.writeback=on,backing.file.cache.direct=off,backing.file.cache.no-flush=on\" +hmp_cmds="qemu-io none0 \"reopen -o file.cache.direct=off,file.cache.no-flush=off\" +qemu-io none0 \"reopen -o backing.file.cache.direct=off,backing.file.cache.no-flush=on\" qemu-io none0 \"reopen -c none\" info block image info block file diff --git a/tests/qemu-iotests/142.out b/tests/qemu-iotests/142.out index 5dd5bd0..32dc802 100644 --- a/tests/qemu-iotests/142.out +++ b/tests/qemu-iotests/142.out @@ -132,7 +132,7 @@ cache.direct=on on backing-file cache.writeback=off on none0 Cache mode: writethrough - Cache mode: writethrough + Cache mode: writeback Cache mode: writeback Cache mode: writeback Cache mode: writeback @@ -342,7 +342,7 @@ cache.direct=on on backing-file cache.writeback=off on none0 Cache mode: writeback, direct - Cache mode: writethrough + Cache mode: writeback Cache mode: writeback Cache mode: writeback Cache mode: writeback @@ -503,7 +503,7 @@ cache.direct=on on backing-file cache.writeback=off on blk Cache mode: writethrough - Cache mode: writethrough + Cache mode: writeback Cache mode: writeback Cache mode: writeback Cache mode: writeback @@ -707,7 +707,7 @@ cache.no-flush=on on backing-file --- Change cache mode after reopening child --- Cache mode: writeback, direct - Cache mode: writethrough + Cache mode: writeback Cache mode: writeback, direct Cache mode: writeback, ignore flushes *** done |