On 03/14/2016 09:44 AM, Kevin Wolf wrote:
> Writethrough mode is going to become a BlockBackend feature rather than
> a BDS one, so forbid it in places where we won't be able to support it
> when the code finally matches the envisioned design.
> 
> We only allowed setting the cache mode of non-root nodes after the 2.5
> release, so we're still free to make this change.
> 
> The target of block jobs is now always opened in a writeback mode
> because it doesn't have a BlockBackend attached. This makes more sense
> anyway because block jobs know when to flush. If the graph is modified
> on job completion, the original cache mode moves to the new root, so
> for the guest device writethough always stays enabled if it was
> configured this way.
> 
> Signed-off-by: Kevin Wolf <kw...@redhat.com>
> ---
>  block.c                    |  7 ++++
>  blockdev.c                 | 19 ++++++++-
>  tests/qemu-iotests/142     | 50 +++++++++++------------
>  tests/qemu-iotests/142.out | 98 
> +++++++++-------------------------------------
>  4 files changed, 68 insertions(+), 106 deletions(-)
> 

Reviewed-by: Eric Blake <ebl...@redhat.com>

> +++ b/tests/qemu-iotests/142
> @@ -96,36 +96,36 @@ function check_cache_all()
>      # bs->backing
>  
>      echo -e "cache.direct=on on none0"

Pre-existing, but 'echo -e' is non-portable (even in bash, you can set
options such that it changes behavior).  printf is better, if we're
worried about it.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to