The fixes from the previous post are: 1) the in_flight_bitmap is now properly set and cleared [Stefan];
2) persistent dirty bitmap left out [Stefan]; 3) reordered arguments in qmp-command.hx to follow patch order [Stefan]; 4) tests/qemu-iotests/041.out is regenerated; 5) rebased for moved include files and for the discard series Thanks! Paolo Paolo Bonzini (12): host-utils: add ffsl add hierarchical bitmap data type and test cases block: implement dirty bitmap using HBitmap block: make round_to_clusters public mirror: perform COW if the cluster size is bigger than the granularity block: return count of dirty sectors, not chunks block: allow customizing the granularity of the dirty bitmap mirror: allow customizing the granularity mirror: switch mirror_iteration to AIO mirror: add buf-size argument to drive-mirror mirror: support more than one in-flight AIO operation mirror: support arbitrarily-sized iterations block-migration.c | 7 +- block.c | 124 ++++---------- block/mirror.c | 381 ++++++++++++++++++++++++++++++++++------- blockdev.c | 37 +++-- hmp.c | 2 +- include/block/block.h | 11 +- include/block/block_int.h | 10 +- include/qemu/hbitmap.h | 207 ++++++++++++++++++++++ include/qemu/host-utils.h | 26 +++ qapi-schema.json | 15 ++- qmp-commands.hx | 10 +- tests/Makefile | 3 + tests/qemu-iotests/041 | 52 ++++++ tests/qemu-iotests/041.out | 4 +- tests/test-hbitmap.c | 408 ++++++++++++++++++++++++++++++++++++++++++++ trace-events | 12 ++ util/Makefile.objs | 2 +- util/hbitmap.c | 400 +++++++++++++++++++++++++++++++++++++++++++ 18 files changed, 1527 insertions(+), 184 deletions(-) create mode 100644 include/qemu/hbitmap.h create mode 100644 tests/test-hbitmap.c create mode 100644 util/hbitmap.c