Posted as RFC because qemu probably doesn't reopen backing images for
bitmap operations resulting in:

 $ virsh checkpoint-delete vm --checkpointname a
 error: Failed to delete checkpoint a
 error: internal error: unable to execute QEMU command 'transaction': Bitmap 
'a' is readonly and cannot be modified

Unfortunately this can't be done manually because 'blockdev-reopen' is
still experimental.

Peter Krempa (16):
  qemu: checkpoint: Store whether deleted checkpoint is current in a
    variable
  qemu: checkpoint: split out checkpoint deletion bitmaps
  qemu: checkpoint: rename disk->chkdisk in qemuCheckpointDiscardBitmaps
  qemu: checkpoint: rename disk->chkdisk in qemuCheckpointAddActions
  qemu: checkpoint: Use disk definition directly when creating
    checkpoint
  qemu: checkpoint: tolerate missing disks on checkpoint deletion
  qemu: domain: Remove unused qemuDomainDiskNodeFormatLookup
  qemu: checkpoint: Introduce helper to find checkpoint disk definition
    in parents
  qemu: checkpoint: Extract calculation of bitmap merging for checkpoint
    deletion
  tests: qemublock: Add test for checkpoint deletion bitmap merge
  tests: qemublock: Add few more test cases for checkpoint deletion
  tests: qemublock: Add synthetic snapshot+checkpoint test data
  qemu: checkpoint: Introduce support for deleting checkpoints accross
    snapshots
  tests: qemublock: Add checkpoint deletion test for deep backing chain
  tests: qemublock: Add checkpoint deletion tests for some special cases
  qemu: checkpoint: Track and relabel images for bitmap merging

 src/qemu/qemu_checkpoint.c                    | 329 +++++--
 src/qemu/qemu_checkpoint.h                    |   9 +
 src/qemu/qemu_domain.c                        |  14 -
 src/qemu/qemu_domain.h                        |   3 -
 tests/qemublocktest.c                         | 102 +++
 .../snapshots-synthetic-checkpoint.json       | 827 ++++++++++++++++++
 .../bitmap/snapshots-synthetic-checkpoint.out |  13 +
 .../checkpointdelete/basic-current-out.json   |  29 +
 .../basic-intermediate1-out.json              |  22 +
 .../basic-intermediate2-out.json              |  22 +
 .../basic-intermediate3-out.json              |  22 +
 .../checkpointdelete/basic-noparent-out.json  |   9 +
 .../snapshots-current-out.json                |  29 +
 .../snapshots-intermediate1-out.json          |  24 +
 .../snapshots-intermediate2-out.json          |  62 ++
 .../snapshots-intermediate3-out.json          |  61 ++
 .../snapshots-noparent-out.json               |  27 +
 ...hots-synthetic-checkpoint-current-out.json |  29 +
 ...ynthetic-checkpoint-intermediate1-out.json |  31 +
 ...ynthetic-checkpoint-intermediate2-out.json |  34 +
 ...ynthetic-checkpoint-intermediate3-out.json |  61 ++
 ...ots-synthetic-checkpoint-noparent-out.json |  27 +
 22 files changed, 1680 insertions(+), 106 deletions(-)
 create mode 100644 
tests/qemublocktestdata/bitmap/snapshots-synthetic-checkpoint.json
 create mode 100644 
tests/qemublocktestdata/bitmap/snapshots-synthetic-checkpoint.out
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/basic-current-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/basic-intermediate1-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/basic-intermediate2-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/basic-intermediate3-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/basic-noparent-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/snapshots-current-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/snapshots-intermediate1-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/snapshots-intermediate2-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/snapshots-intermediate3-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/snapshots-noparent-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/snapshots-synthetic-checkpoint-current-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/snapshots-synthetic-checkpoint-intermediate1-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/snapshots-synthetic-checkpoint-intermediate2-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/snapshots-synthetic-checkpoint-intermediate3-out.json
 create mode 100644 
tests/qemublocktestdata/checkpointdelete/snapshots-synthetic-checkpoint-noparent-out.json

-- 
2.24.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to