[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 03/24] block: Add BDS.backing_overridden
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v2 03/24] block: Add BDS.backing_overridden |
Date: |
Sun, 27 Nov 2016 03:33:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
On 27.11.2016 02:56, Max Reitz wrote:
> If the backing file is overridden, this most probably does change the
> guest-visible data of a BDS. Therefore, we will need to consider this in
> bdrv_refresh_filename().
>
> Adding a new field to the BDS is not nice, but it is very simple and
> exactly keeps track of whether the backing file has been overridden.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> While this patch adds a TODO comment that sounds like it could be
> resolved in a later patch in this series, it is not.
>
> Checking whether @options contains significant runtime options is not
> trivial, because we not only care about significant options at that
> level but also at levels below: Normally, it should be fine to check
> that for backing_hd and backing_hd->file->bs, but that's not for sure.
> So I decided a false positive is better than a false negative here,
> which is why the TODO persists throughout the series.
Of course I only noticed after I had sent this series that this was
wrong: It breaks iotest 030, and that is because even just giving a node
name to a backing node will now result in the backed file getting a JSON
filename. That is very unfortunate if one then tries to address files in
the backing chain by filename (which, very unfortunately, we do for
block-stream and block-commit).
So I guess in v3 I will do what I hinted at above: Shallow-clone the
options before @driver is set and after backing_hd has been opened,
check whether there are any significant options for either backing_hd or
backing_hd->file->bs.
Max
> ---
> block.c | 14 ++++++++++++++
> block/mirror.c | 4 ++++
> blockdev.c | 16 ++++++++++++++++
> include/block/block_int.h | 1 +
> 4 files changed, 35 insertions(+)
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v2 00/24] block: Fix some filename generation issues, Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 01/24] block/mirror: Small absolute-paths simplification, Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 02/24] block: Use children list in bdrv_refresh_filename, Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 03/24] block: Add BDS.backing_overridden, Max Reitz, 2016/11/26
- Re: [Qemu-block] [PATCH v2 03/24] block: Add BDS.backing_overridden,
Max Reitz <=
- [Qemu-block] [PATCH v2 05/24] block: Make path_combine() return the path, Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 04/24] block: Respect backing bs in bdrv_refresh_filename, Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 06/24] block: bdrv_get_full_backing_filename_from_...'s ret. val., Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 07/24] block: bdrv_get_full_backing_filename's ret. val., Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 08/24] block: Add bdrv_make_absolute_filename(), Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 09/24] block: Fix bdrv_find_backing_image(), Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 10/24] block: Add bdrv_dirname(), Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 11/24] blkverify: Make bdrv_dirname() return NULL, Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 12/24] quorum: Make bdrv_dirname() return NULL, Max Reitz, 2016/11/26
- [Qemu-block] [PATCH v2 13/24] block/nbd: Implement bdrv_dirname(), Max Reitz, 2016/11/26