On 7/15/19 8:01 PM, John Snow wrote:
> Based-on: https://github.com/jnsnow/qemu/tree/bitmaps
>
> This follows the previous series which adds the 'bitmap' sync mode
> and uses it to add interactions with bitmaps to the 'full' and 'top'
> modes to blockdev-backup and drive-backup.
>
> Why?
> on-success: Can conveniently synchronize a bitmap to a full backup.
> Allows for transactionless anchor backups.
> Allows us to attempt an anchor backup without damaging
> our bitmap until the backup is successful.
> Allows for transactional, ungrouped anchor backups.
> always: Allows us to resume full/top style backups with a later
> invocation to sync=bitmap. Neat!
>
> Summary:
> 1-3: Refactor iotest 257 to accommodate this;
> 4-5: Augment 257 to test trivial failure cases
> 6-9: Refactor sync=top for block/backup
> 10: Implement feature
> 11: Test feature
>
> ===
> V2:
> ===
>
> 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/11:[0010] [FC] 'iotests/257: add Pattern class'
> 002/11:[0003] [FC] 'iotests/257: add EmulatedBitmap class'
> 003/11:[0042] [FC] 'iotests/257: Refactor backup helpers'
> 004/11:[----] [--] 'block/backup: hoist bitmap check into QMP interface'
> 005/11:[0016] [FC] 'iotests/257: test API failures'
> 006/11:[down] 'block/backup: improve sync=bitmap work estimates'
> 007/11:[down] 'block/backup: centralize copy_bitmap initialization'
> 008/11:[down] 'block/backup: add backup_is_cluster_allocated'
> 009/11:[down] 'block/backup: teach TOP to never copy unallocated regions'
> 010/11:[0002] [FC] 'block/backup: support bitmap sync modes for non-bitmap backups'
> 011/11:[0058] [FC] 'iotests/257: test traditional sync modes'
>
> 001: Fallout from changing floor(x / y) to x // y.
> Fallout from changing x = x | y to x |= y.
> (Decided not to keep RB.)
> 002: Removed dead variable
> Change x = x - y to x -= y in clear_bits()
> 003: Substantially reorganize patch. Hopefully 10% more clever and 10% less cute.
> 004: (Added RB.)
> 005: Added docstring to test_backup_api
> Fixed test matrix enumeration to have consistent order in python2/3
> (Declined RB.)
> ---: What was patch 006 was dropped, and became patches 6-9.
> 6-9: New!
> 010: Was 007;
> Formatting fix.
> (Added RB.)
> 011: Was 008;
> Adjust bitmap clearing/expected code as a consequence of #9.
> Fallout from changes to 005.
>
> John Snow (11):
> iotests/257: add Pattern class
> iotests/257: add EmulatedBitmap class
> iotests/257: Refactor backup helpers
> block/backup: hoist bitmap check into QMP interface
> iotests/257: test API failures
> block/backup: improve sync=bitmap work estimates
> block/backup: centralize copy_bitmap initialization
> block/backup: add backup_is_cluster_allocated
> block/backup: teach TOP to never copy unallocated regions
> block/backup: support bitmap sync modes for non-bitmap backups
> iotests/257: test traditional sync modes
>
> block/backup.c | 188 +-
> block/trace-events | 1 +
> blockdev.c | 32 +
> qapi/block-core.json | 6 +-
> tests/qemu-iotests/256.out | 4 +-
> tests/qemu-iotests/257 | 342 ++--
> tests/qemu-iotests/257.out | 3366 +++++++++++++++++++++++++++++++++++-
> 7 files changed, 3683 insertions(+), 256 deletions(-)
>
[Applied small edits to 9 and 11, and:]
Thanks, applied to my bitmaps tree:
https://github.com/jnsnow/qemu/commits/bitmaps
https://github.com/jnsnow/qemu.git
--js