[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 30/42] qemu-img: Use child access functions
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH v6 30/42] qemu-img: Use child access functions |
Date: |
Mon, 12 Aug 2019 15:28:21 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 12.08.19 14:14, Vladimir Sementsov-Ogievskiy wrote:
> 09.08.2019 19:13, Max Reitz wrote:
>> This changes iotest 204's output, because blkdebug on top of a COW node
>> used to make qemu-img map disregard the rest of the backing chain (the
>> backing chain was broken by the filter). With this patch, the
>> allocation in the base image is reported correctly.
>>
>> Signed-off-by: Max Reitz <address@hidden>
>> ---
>> qemu-img.c | 33 ++++++++++++++++++++-------------
>> tests/qemu-iotests/204.out | 1 +
>> 2 files changed, 21 insertions(+), 13 deletions(-)
>>
>> diff --git a/qemu-img.c b/qemu-img.c
>> index 79983772de..3b30c5ae70 100644
>> --- a/qemu-img.c
>> +++ b/qemu-img.c
[...]
>> @@ -2490,7 +2492,8 @@ static int img_convert(int argc, char **argv)
>> * s.target_backing_sectors has to be negative, which it will
>> * be automatically). The backing file length is used only
>> * for optimizations, so such a case is not fatal. */
>> - s.target_backing_sectors = bdrv_nb_sectors(out_bs->backing->bs);
>> + s.target_backing_sectors =
>> + bdrv_nb_sectors(bdrv_filtered_cow_bs(out_bs));
>
> why not skip_rw_filters? It will fail if out_bs is filter..
Because I forgot this place. :-) Although backing_chain_next() would be
simpler here and do the same, effectively.
Max
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v6 25/42] mirror: Deal with filters, (continued)
- [Qemu-devel] [PATCH v6 27/42] commit: Deal with filters, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 28/42] stream: Deal with filters, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 29/42] nbd: Use CAF when looking for dirty bitmap, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 30/42] qemu-img: Use child access functions, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 31/42] block: Drop backing_bs(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 32/42] block: Make bdrv_get_cumulative_perm() public, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 33/42] blockdev: Fix active commit choice, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 38/42] iotests: Let complete_and_wait() work with commit, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 34/42] block: Inline bdrv_co_block_status_from_*(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 36/42] iotests: Add tests for mirror @replaces loops, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 35/42] block: Fix check_to_replace_node(), Max Reitz, 2019/08/09