qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 04/25] block: Respect backing bs in bdrv_refr


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4 04/25] block: Respect backing bs in bdrv_refresh_filename
Date: Mon, 16 Jan 2017 14:43:24 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 01/11/2017 12:14 PM, Max Reitz wrote:

The mail archives show this series stopping at 4/25; what happened to 5-25?
https://lists.gnu.org/archive/html/qemu-devel/2017-01/threads.html#01912

> Basically, bdrv_refresh_filename() should respect all children of a
> BlockDriverState. However, generally those children are driver-specific,
> so this function cannot handle the general case. On the other hand,
> there are only few drivers which use other children than @file and
> @backing (that being vmdk, quorum, and blkverify).
> 
> Most block drivers only use @file and/or @backing (if they use any
> children at all). Both can be implemented directly in
> bdrv_refresh_filename.
> 
> The user overriding the file's filename is already handled, however, the
> user overriding the backing file is not. If this is done, opening the
> BDS with the plain filename of its file will not be correct, so we may
> not set bs->exact_filename in that case.
> 
> iotest 051 contains test cases for overwriting the backing file, and so
> its output changes with this patch applied (which I consider a good
> thing).
> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
>  block.c                       | 12 +++++++++++-
>  tests/qemu-iotests/051.out    |  8 ++++----
>  tests/qemu-iotests/051.pc.out |  8 ++++----
>  3 files changed, 19 insertions(+), 9 deletions(-)
> 

Reviewed-by: Eric Blake <address@hidden>

> +++ b/tests/qemu-iotests/051.out
> @@ -59,7 +59,7 @@ QEMU X.Y.Z monitor - type 'help' for more information
>  Testing: -drive 
> file=TEST_DIR/t.qcow2,driver=qcow2,backing.file.filename=TEST_DIR/t.qcow2.orig,if=none,id=drive0
>  -nodefaults
>  QEMU X.Y.Z monitor - type 'help' for more information
>  (qemu) iininfinfoinfo 
> info binfo 
> blinfo bloinfo 
> blocinfo block
> -drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
> +drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file": {"driver": 
> "file", "filename": "TEST_DIR/t.qcow2.orig"}}, "driver": "qcow2", "file": 
> {"driver": "file", "filename": "TEST_DIR/t.qcow2"}} (qcow2)

These test files are a pain to read, but I concur that the resulting
output looks better now that it is obvious that the backing file has
been overridden.

-- 
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

[Prev in Thread] Current Thread [Next in Thread]