The main purpose of this series is to add a progress report to qemu-img amend. This is achieved by adding a callback function to bdrv_amend_options() - the reasons for this choice are explained in patch 1.
While adapting qcow2's expand_zero_clusters_in_l1() accordingly, I noticed a way to simplify it and get rid of the rather ugly bitmap used there (patch 6). This series depends on v2 of my "qemu-img: Allow source cache mode specification" series. This series is an alternative of the one with the same name (and one additional patch) without the tag "alt"; the main difference is that the first version adds optimizations and be as exact as possible, whereas this version rather tries to be as simple as possible (because the code being touched is rarely ever used). The differences are the following: - switched patches 4 and 5, because 5 (now 4) does not rely on 4 (now 5) in this version - patch 5 (here: 4) uses a far simpler model to track progress (instead of counting the expanded zero clusters, it counts the number of visited L1 entries) - patch 6 had to be rebased on top of it - patch 7 has been dropped (it optimizes zero cluster expansion in exchange for more complicated code for a function which should be rarely ever used) - patch 8 (here: 7) had to be adapted accordingly: - dropped the test case for patch 7 (did not fail without it, but did not make any sense either) - different progress output due to the differences in patch 5 (here: 4) git-upstream-diff output against the non-alt version: Key: [----] : patches are identical [####] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively 001/7:[----] [--] 'block: Add status callback to bdrv_amend_options()' 002/7:[----] [--] 'qemu-img: Add progress output for amend' 003/7:[----] [--] 'qemu-img: Fix insignifcant memleak' 004/7:[0137] [FC] 'block/qcow2: Implement status CB for amend' 005/7:[----] [--] 'block/qcow2: Make get_refcount() global' 006/7:[0011] [FC] 'block/qcow2: Simplify shared L2 handling in amend' 007/7:[0026] [FC] 'iotests: Expand test 061' Max Reitz (7): block: Add status callback to bdrv_amend_options() qemu-img: Add progress output for amend qemu-img: Fix insignifcant memleak block/qcow2: Implement status CB for amend block/qcow2: Make get_refcount() global block/qcow2: Simplify shared L2 handling in amend iotests: Expand test 061 block.c | 5 +- block/qcow2-cluster.c | 114 +++++++++++++++++++++------------------------ block/qcow2-refcount.c | 23 ++++----- block/qcow2.c | 10 ++-- block/qcow2.h | 5 +- include/block/block.h | 5 +- include/block/block_int.h | 3 +- qemu-img.c | 30 ++++++++++-- tests/qemu-iotests/061 | 27 +++++++++++ tests/qemu-iotests/061.out | 32 +++++++++++++ tests/qemu-iotests/group | 2 +- 11 files changed, 171 insertions(+), 85 deletions(-) -- 2.0.3