This series introduces new block allocator scheme into unused data blocks inside the image first and only after that extends the file. On top of that naive implementation of discard and write-zeroes (through the discard) is added.
There are also a bunch of bugs revealed in the code during the implementation and testing. Signed-off-by: Denis V. Lunev <d...@openvz.org> Denis V. Lunev (21): parallels: fix formatting in bdrv_parallels initialization parallels: mark driver as supporting CBT parallels: invent parallels_opts_prealloc() helper to parse prealloc opts parallels: return earler in fail_format branch in parallels_open() parallels: return earlier from parallels_open() function on error parallels: refactor path when we need to re-check image in parallels_open parallels: create mark_used() helper which sets bit in used bitmap tests: ensure that image validation will not cure the corruption parallels: fix broken parallels_check_data_off() parallels: add test which will validate data_off fixes through repair parallels: collect bitmap of used clusters at open tests: fix broken deduplication check in parallels format test tests: test self-cure of parallels image with duplicated clusters parallels: accept multiple clusters in mark_used() parallels: update used bitmap in allocate_cluster parallels: naive implementation of allocate_clusters with used bitmap parallels: improve readability of allocate_clusters parallels: naive implementation of parallels_co_pdiscard tests: extend test 131 to cover availability of the discard operation parallels: naive implementation of parallels_co_pwrite_zeroes tests: extend test 131 to cover availability of the write-zeroes block/parallels.c | 382 ++++++++++++++---- block/parallels.h | 3 + tests/qemu-iotests/131 | 51 +++ tests/qemu-iotests/131.out | 58 +++ tests/qemu-iotests/tests/parallels-checks | 76 +++- tests/qemu-iotests/tests/parallels-checks.out | 65 ++- 6 files changed, 534 insertions(+), 101 deletions(-) -- 2.34.1