qemu-io: Use bdrv_parse_cache_mode() in reopen_f()
We must forbid changing the WCE flag in bdrv_reopen() in the same patch, as otherwise the behaviour would change so that the flag takes precedence over the explicitly specified option. The correct value of the WCE flag depends on the BlockBackend user (e.g. guest device) and isn't a decision that the QMP client makes, so this change is what we want. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
04feb4a507
commit
19dbecdcee
4 changed files with 21 additions and 15 deletions
|
|
@ -216,7 +216,7 @@ echo
|
|||
# BDS initialised with the json: pseudo-protocol, but still have it inherit
|
||||
# options from its parent node.
|
||||
|
||||
hmp_cmds="qemu-io none0 \"reopen -o cache.writeback=off,cache.direct=on,cache.no-flush=on\"
|
||||
hmp_cmds="qemu-io none0 \"reopen -o cache.direct=on,cache.no-flush=on\"
|
||||
info block none0
|
||||
info block image
|
||||
info block blkdebug
|
||||
|
|
|
|||
|
|
@ -414,7 +414,7 @@ cache.no-flush=on on backing-file
|
|||
|
||||
--- Change cache mode in parent, child has explicit option in JSON ---
|
||||
|
||||
Cache mode: writethrough, direct, ignore flushes
|
||||
Cache mode: writeback, direct, ignore flushes
|
||||
Cache mode: writeback, direct, ignore flushes
|
||||
Cache mode: writeback, direct, ignore flushes
|
||||
Cache mode: writeback, ignore flushes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue