Skip to content

parallels: Add full dirty bitmap support

Denis V. Lunev qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest25 patches 3 repliesIn review
  2. v625 patches 5 repliesSuperseded

Changes in v7 from the cover letter

Rebased on master, which brought require_hmp=True into 15, 24 and 25. 12: Renamed a module scope variable which the test functions shadow. 17: Moved the read-only open case to 19, where the output it looks at
exists for the first time. It could not pass here.
19: Reordered the QAPI additions and gave ImageInfoSpecificKind its
@parallels line, both on Markus' review. Report a bitmap which can not be used as inconsistent, and cover that.
21, 22: Renamed the module scope variables which the test functions
shadow, so that iotest 297 passes at every patch of the series.

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/25parallels: Set s->used_bmap to NULL in parallels_free_used_bitmap()block/parallels.c+1 -00 replies
2/25parallels: split inactivation out and add the activation counterpartblock/parallels.c+38 -80 replies
3/25iotests: cover inactivating a read-only nodetests/qemu-iotests/tests/inactive-node-nbd tests/qemu-iotests/tests/inactive-node-nbd.out+22 -00 replies
4/25parallels: Make mark_used() a global functionblock/parallels.c block/parallels.h+11 -60 replies
5/25parallels: Limit search in parallels_mark_used to the last marked clusterblock/parallels.c+5 -30 replies
6/25parallels: Move host clusters allocation to a separate functionblock/parallels.c block/parallels.h tests/qemu-iotests/tests/parallels-checks +1 more+145 -560 replies
7/25parallels: do not let the check die on what it is meant to reportblock/parallels.c tests/qemu-iotests/tests/parallels-checks tests/qemu-iotests/tests/parallels-checks.out+74 -50 replies
8/25parallels: Create used bitmap even if checks neededblock/parallels.c+4 -60 replies
9/25parallels: Drop unused clusters at the end of the imageblock/parallels.c tests/qemu-iotests/tests/parallels-checks tests/qemu-iotests/tests/parallels-checks.out+126 -380 replies
10/25parallels: Remove unnecessary data_end fieldblock/parallels.c block/parallels.h+15 -430 replies
11/25parallels: Add dirty bitmaps savingblock/parallels-ext.c block/parallels.c block/parallels.h+312 -20 replies
12/25parallels: Let image extensions work in RW modeblock/parallels-ext.c block/parallels.c tests/qemu-iotests/tests/parallels-read-bitmap +1 more+60 -290 replies
13/25parallels: Handle L1 entries equal to oneblock/parallels-ext.c+9 -10 replies
14/25iotests: cover the Format Extension against the leak checktests/qemu-iotests/tests/parallels-checks tests/qemu-iotests/tests/parallels-checks.out+83 -00 replies
15/25iotests: run the persistent dirty bitmap test on parallelstests/qemu-iotests/165+13 -50 replies
16/25parallels: reject a bitmap L1 entry outside the data areablock/parallels-ext.c tests/qemu-iotests/tests/parallels-read-bitmap tests/qemu-iotests/tests/parallels-read-bitmap.out+53 -60 replies
17/25parallels: do not trust the bitmaps of an image which was not closedblock/parallels-ext.c tests/qemu-iotests/tests/parallels-checks tests/qemu-iotests/tests/parallels-checks.out+49 -20 replies
18/25parallels: implement removing a stored dirty bitmapblock/parallels-ext.c block/parallels.c block/parallels.h+54 -10 replies
19/25parallels: report the stored dirty bitmaps in qemu-img infoblock/parallels-ext.c block/parallels.c block/parallels.h +3 more+118 -22 replies
20/25iotests: rename parallels-read-bitmap to parallels-bitmaptests/qemu-iotests/tests/parallels-bitmap tests/qemu-iotests/tests/parallels-bitmap.out+1 -10 replies
21/25iotests: cover storing a parallels dirty bitmaptests/qemu-iotests/tests/parallels-bitmap tests/qemu-iotests/tests/parallels-bitmap.out+222 -10 replies
22/25iotests: cover the qemu-img bitmap operations on parallelstests/qemu-iotests/tests/parallels-bitmap tests/qemu-iotests/tests/parallels-bitmap.out+51 -00 replies
23/25iotests: cover a broken Format Extension and a combined repairtests/qemu-iotests/tests/parallels-checks tests/qemu-iotests/tests/parallels-checks.out+137 -00 replies
24/25tests: Turned on 256, 299, 304 and block-status-cache for parallels formattests/qemu-iotests/256 tests/qemu-iotests/299 tests/qemu-iotests/304 +1 more+4 -40 replies
25/25tests: Add parallels format support to image-fleecingtests/qemu-iotests/tests/image-fleecing+10 -41 reply

Reviews trailers per patch

3 of 25 patches have a Reviewed-by or Acked-by.

PatchDenis V. LunevVladimir Sementsov-Ogievskiy
1/25R-b
2/25
3/25
4/25R-b
5/25
6/25
7/25
8/25
9/25
10/25
11/25
12/25
13/25
14/25
15/25
16/25
17/25
18/25
19/25
20/25
21/25
22/25
23/25
24/25
25/25R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 00/25] parallels: Add full dirty bitmap support

Parallels format driver:
* make some preparation
* add dirty bitmap saving
* make dirty bitmap RW
* fix broken checks
* refactor leak check
* add parallels format support to several tests

Alexander left the team, so this comes from me. v6 was:

https://lore.kernel.org/qemu-devel/[email protected]/

and v5, his last one, was:

https://lore.kernel.org/qemu-devel/[email protected]/

It does not apply to master on its own. It goes on top of "[PATCH 0/8]
parallels: fix Format Extension parsing":

https://lore.kernel.org/qemu-devel/[email protected]/

whose patch 3 is merged as dc04053687 ("dirty-bitmap: fix integer overflow in serialization coverage"). The other seven are unchanged and still apply, so they are not resent. Together they sit on master at a925240509 ("Merge tag 'block-pull-request' of
https://gitlab.com/stefanha/qemu into staging").

v7:
Rebased on master, which brought require_hmp=True into 15, 24 and 25. 12: Renamed a module scope variable which the test functions shadow. 17: Moved the read-only open case to 19, where the output it looks at
exists for the first time. It could not pass here.
19: Reordered the QAPI additions and gave ImageInfoSpecificKind its
@parallels line, both on Markus' review. Report a bitmap which can not be used as inconsistent, and cover that.
21, 22: Renamed the module scope variables which the test functions
shadow, so that iotest 297 passes at every patch of the series.

v6:
Reworked, so the numbers have shifted.
2: Made it .bdrv_inactivate and armed the in use flag on activation. 3: New patch, inactivating a read-only node.
5: cluster_end is uint64_t.
6: Absorbed the mark_unused helper, fixed the used bitmap growth. 7: New patch, the check no longer dies on what it is meant to report. 9: Absorbed the three parallels_check_leak() patches and the truncation. 10: Dropped the redundant bdrv_pwrite_zeroes() of the reuse branch. 11: Refuse a bitmap which does not fit, report a lost one, added ext_end. 12: Absorbed "Make a loaded dirty bitmap persistent", drop a broken one. 13: Bound the search by the region rather than by the cluster. 14: New patch, the Format Extension against the leak check. 15: Skipped test_reopen_rw, the bitmap name is a UUID.
16: New patch, a bitmap L1 entry has to point inside the data area. 17: Mark the bitmaps inconsistent instead of skipping the load. 18: New patch, block-dirty-bitmap-remove reaches the image. 19: New patch, qemu-img info reports the bitmaps.
20: New patch, renames parallels-read-bitmap to parallels-bitmap. 21: New patch, covers storing a bitmap.
22: New patch, covers the qemu-img bitmap sub-commands.
23: New patch, covers a broken Format Extension and a combined repair. 25: Added a comment about the bitmap name.
Dropped "Preserve extensions cluster for non-transient extensions" and "Reverse a conditional in parallels_check_leak()".

Alexander Ivanov (4):
parallels: Set s->used_bmap to NULL in parallels_free_used_bitmap()
parallels: Make mark_used() a global function
parallels: Create used bitmap even if checks needed
tests: Turned on 256, 299, 304 and block-status-cache for parallels
format

Denis V. Lunev (21):
parallels: split inactivation out and add the activation counterpart
iotests: cover inactivating a read-only node
parallels: Limit search in parallels_mark_used to the last marked
cluster
parallels: Move host clusters allocation to a separate function
parallels: do not let the check die on what it is meant to report
parallels: Drop unused clusters at the end of the image
parallels: Remove unnecessary data_end field
parallels: Add dirty bitmaps saving
parallels: Let image extensions work in RW mode
parallels: Handle L1 entries equal to one
iotests: cover the Format Extension against the leak check
iotests: run the persistent dirty bitmap test on parallels
parallels: reject a bitmap L1 entry outside the data area
parallels: do not trust the bitmaps of an image which was not closed
parallels: implement removing a stored dirty bitmap
parallels: report the stored dirty bitmaps in qemu-img info
iotests: rename parallels-read-bitmap to parallels-bitmap
iotests: cover storing a parallels dirty bitmap
iotests: cover the qemu-img bitmap operations on parallels
iotests: cover a broken Format Extension and a combined repair
tests: Add parallels format support to image-fleecing

 block/parallels-ext.c                         | 437 +++++++++++++++-
 block/parallels.c                             | 455 +++++++++++------
 block/parallels.h                             |  23 +-
 qapi/block-core.json                          |  46 +-
 tests/qemu-iotests/165                        |  18 +-
 tests/qemu-iotests/256                        |   2 +-
 tests/qemu-iotests/299                        |   2 +-
 tests/qemu-iotests/304                        |   2 +-
 tests/qemu-iotests/tests/block-status-cache   |   2 +-
 tests/qemu-iotests/tests/image-fleecing       |  14 +-
 tests/qemu-iotests/tests/inactive-node-nbd    |  14 +
 .../qemu-iotests/tests/inactive-node-nbd.out  |   8 +
 tests/qemu-iotests/tests/parallels-bitmap     | 475 ++++++++++++++++++
 tests/qemu-iotests/tests/parallels-bitmap.out | 106 ++++
 tests/qemu-iotests/tests/parallels-checks     | 235 +++++++++
 tests/qemu-iotests/tests/parallels-checks.out | 193 +++++++
 .../qemu-iotests/tests/parallels-read-bitmap  | 231 ---------
 .../tests/parallels-read-bitmap.out           |  39 --
 18 files changed, 1848 insertions(+), 454 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/parallels-bitmap
 create mode 100644 tests/qemu-iotests/tests/parallels-bitmap.out
 delete mode 100755 tests/qemu-iotests/tests/parallels-read-bitmap
 delete mode 100644 tests/qemu-iotests/tests/parallels-read-bitmap.out
Signature · 1 line
2.53.0