[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) i[K[Din[K[D[Dinf[K[D[D[Dinfo[K[D[D[D[Dinfo
> [K[D[D[D[D[Dinfo b[K[D[D[D[D[D[Dinfo
> bl[K[D[D[D[D[D[D[Dinfo blo[K[D[D[D[D[D[D[D[Dinfo
> bloc[K[D[D[D[D[D[D[D[D[Dinfo block[K
> -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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v4 00/25] block: Fix some filename generation issues, Max Reitz, 2017/01/11
- [Qemu-devel] [PATCH v4 01/25] block/mirror: Small absolute-paths simplification, Max Reitz, 2017/01/11
- [Qemu-devel] [PATCH v4 02/25] block: Use children list in bdrv_refresh_filename, Max Reitz, 2017/01/11
- [Qemu-devel] [PATCH v4 03/25] block: Add BDS.backing_overridden, Max Reitz, 2017/01/11
- [Qemu-devel] [PATCH v4 04/25] block: Respect backing bs in bdrv_refresh_filename, Max Reitz, 2017/01/11
- Re: [Qemu-devel] [PATCH v4 04/25] block: Respect backing bs in bdrv_refresh_filename,
Eric Blake <=
- [Qemu-devel] [PATCH v4 05/25] block: Make path_combine() return the path, Max Reitz, 2017/01/16
- [Qemu-devel] [PATCH v4 06/25] block: bdrv_get_full_backing_filename_from_...'s ret. val., Max Reitz, 2017/01/16
- [Qemu-devel] [PATCH v4 07/25] block: bdrv_get_full_backing_filename's ret. val., Max Reitz, 2017/01/16
- [Qemu-devel] [PATCH v4 08/25] block: Add bdrv_make_absolute_filename(), Max Reitz, 2017/01/16
- [Qemu-devel] [PATCH v4 09/25] block: Fix bdrv_find_backing_image(), Max Reitz, 2017/01/16
- [Qemu-devel] [PATCH v4 10/25] block: Add bdrv_dirname(), Max Reitz, 2017/01/16