[PATCH v5 0/5] fix & merge block_status_above and is_allocated_above

Vladimir Sementsov-Ogievskiy posted 5 patches 3 years, 10 months ago
Test docker-mingw@fedora passed
Test checkpatch passed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200610120426.12826-1-vsementsov@virtuozzo.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Fam Zheng <fam@euphon.net>, Max Reitz <mreitz@redhat.com>
There is a newer version of this series
block/coroutines.h         |   2 +
block/io.c                 | 100 ++++++++++++++++++-------------------
block/qcow2.c              |  16 +++++-
tests/qemu-iotests/274     |  20 ++++++++
tests/qemu-iotests/274.out |  65 ++++++++++++++++++++++++
5 files changed, 150 insertions(+), 53 deletions(-)
[PATCH v5 0/5] fix & merge block_status_above and is_allocated_above
Posted by Vladimir Sementsov-Ogievskiy 3 years, 10 months ago
v5: rebase on coroutine-wrappers series, 02 changed correspondingly

Based on series "[PATCH v7 0/7] coroutines: generate wrapper code", or
in other words:
Based-on: <20200610100336.23451-1-vsementsov@virtuozzo.com>

Hi all!

These series are here to address the following problem:
block-status-above functions may consider space after EOF of
intermediate backing files as unallocated, which is wrong, as these
backing files are the reason of producing zeroes, we never go further by
backing chain after a short backing file. So, if such short-backing file
is _inside_ requested sub-chain of the backing chain, we should never
report space after its EOF as unallocated.

See patches 01,04,05 for details.

Note, that this series leaves for another day the general problem
around block-status: misuse of BDRV_BLOCK_ALLOCATED as is-fs-allocated
vs go-to-backing.
Audit for this problem is done here:
"backing chain & block status & filters"
https://lists.gnu.org/archive/html/qemu-devel/2020-04/msg04706.html
And I'm going to prepare series to address this problem.

Also, get_block_status func have same disease, but remains unfixed here:
I want to make separate series for it, as it need some more refactoring,
which should be based on series
"[PATCH v5 0/7] coroutines: generate wrapper code"

Vladimir Sementsov-Ogievskiy (5):
  block/io: fix bdrv_co_block_status_above
  block/io: bdrv_common_block_status_above: support include_base
  block/io: bdrv_common_block_status_above: support bs == base
  block/io: fix bdrv_is_allocated_above
  iotests: add commit top->base cases to 274

 block/coroutines.h         |   2 +
 block/io.c                 | 100 ++++++++++++++++++-------------------
 block/qcow2.c              |  16 +++++-
 tests/qemu-iotests/274     |  20 ++++++++
 tests/qemu-iotests/274.out |  65 ++++++++++++++++++++++++
 5 files changed, 150 insertions(+), 53 deletions(-)

-- 
2.21.0


Re: [PATCH v5 0/5] fix & merge block_status_above and is_allocated_above
Posted by Vladimir Sementsov-Ogievskiy 3 years, 8 months ago
ping :)

10.06.2020 15:04, Vladimir Sementsov-Ogievskiy wrote:
> v5: rebase on coroutine-wrappers series, 02 changed correspondingly
> 
> Based on series "[PATCH v7 0/7] coroutines: generate wrapper code", or
> in other words:
> Based-on: <20200610100336.23451-1-vsementsov@virtuozzo.com>
> 
> Hi all!
> 
> These series are here to address the following problem:
> block-status-above functions may consider space after EOF of
> intermediate backing files as unallocated, which is wrong, as these
> backing files are the reason of producing zeroes, we never go further by
> backing chain after a short backing file. So, if such short-backing file
> is _inside_ requested sub-chain of the backing chain, we should never
> report space after its EOF as unallocated.
> 
> See patches 01,04,05 for details.
> 
> Note, that this series leaves for another day the general problem
> around block-status: misuse of BDRV_BLOCK_ALLOCATED as is-fs-allocated
> vs go-to-backing.
> Audit for this problem is done here:
> "backing chain & block status & filters"
> https://lists.gnu.org/archive/html/qemu-devel/2020-04/msg04706.html
> And I'm going to prepare series to address this problem.
> 
> Also, get_block_status func have same disease, but remains unfixed here:
> I want to make separate series for it, as it need some more refactoring,
> which should be based on series
> "[PATCH v5 0/7] coroutines: generate wrapper code"
> 
> Vladimir Sementsov-Ogievskiy (5):
>    block/io: fix bdrv_co_block_status_above
>    block/io: bdrv_common_block_status_above: support include_base
>    block/io: bdrv_common_block_status_above: support bs == base
>    block/io: fix bdrv_is_allocated_above
>    iotests: add commit top->base cases to 274
> 
>   block/coroutines.h         |   2 +
>   block/io.c                 | 100 ++++++++++++++++++-------------------
>   block/qcow2.c              |  16 +++++-
>   tests/qemu-iotests/274     |  20 ++++++++
>   tests/qemu-iotests/274.out |  65 ++++++++++++++++++++++++
>   5 files changed, 150 insertions(+), 53 deletions(-)
> 


-- 
Best regards,
Vladimir

Re: [PATCH v5 0/5] fix & merge block_status_above and is_allocated_above
Posted by Stefan Hajnoczi 3 years, 7 months ago
On Wed, Jun 10, 2020 at 03:04:21PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> v5: rebase on coroutine-wrappers series, 02 changed correspondingly
> 
> Based on series "[PATCH v7 0/7] coroutines: generate wrapper code", or
> in other words:
> Based-on: <20200610100336.23451-1-vsementsov@virtuozzo.com>

Hi Vladimir,
Please rebase this series and the coroutine wrapper series onto
qemu.git/master so the meson build system change is resolved.

Thanks,
Stefan
Re: [PATCH v5 0/5] fix & merge block_status_above and is_allocated_above
Posted by Vladimir Sementsov-Ogievskiy 3 years, 7 months ago
14.09.2020 16:06, Stefan Hajnoczi wrote:
> On Wed, Jun 10, 2020 at 03:04:21PM +0300, Vladimir Sementsov-Ogievskiy wrote:
>> v5: rebase on coroutine-wrappers series, 02 changed correspondingly
>>
>> Based on series "[PATCH v7 0/7] coroutines: generate wrapper code", or
>> in other words:
>> Based-on: <20200610100336.23451-1-vsementsov@virtuozzo.com>
> 
> Hi Vladimir,
> Please rebase this series and the coroutine wrapper series onto
> qemu.git/master so the meson build system change is resolved.
> 

Will do this week.

-- 
Best regards,
Vladimir