This is now based on top of a different implementation of the fix for
late opening of backing chain during block-copy:
https://www.redhat.com/archives/libvir-list/2020-March/msg00317.html
Changes:
- fixes suggested by Pavel
- changes to capability use
- rebased on master
This series uses blockdev-reopen which was not yet stabilized in qemu,
thus is experimental for now, but since incremental backup is
experimental there's no problem with that.
You can fetch the full branch along with patches for enabling the bits
at:
git fetch
https://gitlab.com/pipo.sk/libvirt.git backup-commit
You also need to use patched qemu which you can fetch from:
git fetch
https://gitlab.com/pipo.sk/qemu.git reopen-fixes
Peter Krempa (19):
qemu: capabilities: Add QEMU_CAPS_BLOCKDEV_REOPEN
qemu: monitor: Add handler for blockdev-reopen
qemu: block: implement helpers for blockdev-reopen
qemuCheckpointDiscardBitmaps: Reopen images for bitmap modifications
qemuCheckpointDiscardBitmaps: Use correct field for checkpoint bitmap
name
qemuDomainBlockCommit: Move checks depending on capabilities after
liveness check
qemu: domain: Extract formatting of 'commit' blockjob data into a
function
qemu: domain: Extract parsing of 'commit' blockjob data into a
function
qemu: blockjob: Store list of bitmaps disabled prior to commit
qemublocktest: Fix and optimize fake image chain
qemu: block: Implement helpers for dealing with bitmaps during block
commit
qemublocktest: Add tests for handling of bitmaps during block-commit
qemublocktest: Add more tests for block-commit bitmap handling with
snapshots
qemublocktest: Add tests of broken bitmap chain handling during
block-commit
qemuBlockJobDiskNewCommit: Propagate 'disabledBitmapsBase'
qemuDomainBlockCommit: Handle bitmaps on start of commit
qemuDomainBlockPivot: Handle merging of bitmaps when pivoting an
active block-commit
qemu: blockjob: Handle bitmaps after finish of normal block-commit
qemu: blockjob: Re-enable bitmaps after failed block-copy
src/qemu/qemu_block.c | 320 ++++++++++++++++++
src/qemu/qemu_block.h | 23 ++
src/qemu/qemu_blockjob.c | 97 +++++-
src/qemu/qemu_blockjob.h | 3 +
src/qemu/qemu_capabilities.c | 1 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_checkpoint.c | 9 +-
src/qemu/qemu_domain.c | 110 ++++--
src/qemu/qemu_driver.c | 78 ++++-
src/qemu/qemu_monitor.c | 13 +
src/qemu/qemu_monitor.h | 3 +
src/qemu/qemu_monitor_json.c | 21 ++
src/qemu/qemu_monitor_json.h | 4 +
tests/qemublocktest.c | 126 ++++++-
.../bitmapblockcommit/basic-1-2 | 119 +++++++
.../bitmapblockcommit/basic-1-3 | 119 +++++++
.../bitmapblockcommit/basic-2-3 | 2 +
.../bitmapblockcommit/snapshots-1-2 | 49 +++
.../bitmapblockcommit/snapshots-1-3 | 76 +++++
.../bitmapblockcommit/snapshots-1-4 | 126 +++++++
.../bitmapblockcommit/snapshots-1-5 | 130 +++++++
.../bitmapblockcommit/snapshots-2-3 | 49 +++
.../bitmapblockcommit/snapshots-2-4 | 99 ++++++
.../bitmapblockcommit/snapshots-2-5 | 103 ++++++
.../bitmapblockcommit/snapshots-3-4 | 72 ++++
.../bitmapblockcommit/snapshots-3-5 | 76 +++++
.../bitmapblockcommit/snapshots-4-4 | 11 +
.../bitmapblockcommit/snapshots-4-5 | 33 ++
.../snapshots-synthetic-broken-1-2 | 27 ++
.../snapshots-synthetic-broken-1-3 | 66 ++++
.../snapshots-synthetic-broken-1-4 | 73 ++++
.../snapshots-synthetic-broken-1-5 | 73 ++++
.../snapshots-synthetic-broken-2-3 | 43 +++
.../snapshots-synthetic-broken-2-4 | 50 +++
.../snapshots-synthetic-broken-2-5 | 50 +++
.../snapshots-synthetic-broken-3-4 | 27 ++
.../snapshots-synthetic-broken-3-5 | 27 ++
.../snapshots-synthetic-broken-4-5 | 20 ++
.../blockjob-blockdev-in.xml | 4 +
39 files changed, 2290 insertions(+), 43 deletions(-)
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/basic-1-2
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/basic-1-3
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/basic-2-3
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-2
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-3
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-4
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-5
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-2-3
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-2-4
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-2-5
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-3-4
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-3-5
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-4-4
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-4-5
create mode 100644
tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-1-2
create mode 100644
tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-1-3
create mode 100644
tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-1-4
create mode 100644
tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-1-5
create mode 100644
tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-2-3
create mode 100644
tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-2-4
create mode 100644
tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-2-5
create mode 100644
tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-3-4
create mode 100644
tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-3-5
create mode 100644
tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-4-5
--
2.24.1