[PATCH v6 0/5] fix & merge block_status_above and is_allocated_above
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
Audit for this problem is done here:
"backing chain & block status & filters"
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.
01: handle EOF better, don't merge reported ZERO-es with automatic after-EOF zeroes,
handle first layer out of the loop to make code read simpler. Drop r-b.
02: rebase on 01
05: update test output for extended l2 and backing file format, keep r-b
Based on series "PATCH v8 0/7] coroutines: generate wrapper code" or
in other words:
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 | 126 +++++++++++++++++++++----------------
block/qcow2.c | 16 ++++-
tests/qemu-iotests/274 | 20 ++++++
tests/qemu-iotests/274.out | 68 ++++++++++++++++++++
5 files changed, 175 insertions(+), 57 deletions(-)