[PATCH 00/13] qemu: zero-detection for non-shared-storage migration

Peter Krempa posted 13 patches 1 week, 1 day ago
docs/manpages/virsh.rst          |   8 +-
include/libvirt/libvirt-domain.h |  13 ++
src/qemu/qemu_driver.c           |  55 +++---
src/qemu/qemu_migration.c        | 299 +++++++++++++++++--------------
src/qemu/qemu_migration.h        |   7 +-
src/util/virtypedparam.c         |  72 ++++----
src/util/virtypedparam.h         |   3 +-
tests/virtypedparamtest.c        |  14 +-
tools/virsh-domain.c             |  26 +++
9 files changed, 287 insertions(+), 210 deletions(-)
[PATCH 00/13] qemu: zero-detection for non-shared-storage migration
Posted by Peter Krempa 1 week, 1 day ago
See 12/13 for rationale.

The first patch fixes allocation setting when pre-creating qcow2 images
for migration.

Next few patches fix/improve typed parameter list handling.

Next few refactor handling of 'migrate_disks' parameter and the final
two implement the new feature.

Peter Krempa (13):
  qemu: migration: Pre-create QCOW2 images for non-shared storage with 0
    allocation
  virTypedParamsFilter: Adjust return type and docs
  virTypedParamsGetStringList: Refactor and adjust docs
  virTypedParamsFilter: Introduce option to filter also by type
  virTypedParamsGetStringList: Ensure that returned array is NULL if
    there are no matching fields
  virTypedParamsGetStringList: Ensure that returned string list is
    NULL-terminated
  qemuMigrationSrcBeginPhaseBlockDirtyBitmaps: Use
    qemuMigrationAnyCopyDisk()
  qemu: migration: Don't log 'nmigrate_disks'
  qemu: migration: Avoid use of 'nmigration_disks'
  qemu: migration: Extract validation of disk target list
  qemu: migration: Remove 'nmigration_disks' variable from all places
  qemu: Introduce and wire in
    'VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES'
  virsh: Add support for VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES
    migration parameter

 docs/manpages/virsh.rst          |   8 +-
 include/libvirt/libvirt-domain.h |  13 ++
 src/qemu/qemu_driver.c           |  55 +++---
 src/qemu/qemu_migration.c        | 299 +++++++++++++++++--------------
 src/qemu/qemu_migration.h        |   7 +-
 src/util/virtypedparam.c         |  72 ++++----
 src/util/virtypedparam.h         |   3 +-
 tests/virtypedparamtest.c        |  14 +-
 tools/virsh-domain.c             |  26 +++
 9 files changed, 287 insertions(+), 210 deletions(-)

-- 
2.46.0
Re: [PATCH 00/13] qemu: zero-detection for non-shared-storage migration
Posted by Pavel Hrdina 1 week, 1 day ago
On Mon, Sep 30, 2024 at 03:29:22PM +0200, Peter Krempa wrote:
> See 12/13 for rationale.
> 
> The first patch fixes allocation setting when pre-creating qcow2 images
> for migration.
> 
> Next few patches fix/improve typed parameter list handling.
> 
> Next few refactor handling of 'migrate_disks' parameter and the final
> two implement the new feature.
> 
> Peter Krempa (13):
>   qemu: migration: Pre-create QCOW2 images for non-shared storage with 0
>     allocation
>   virTypedParamsFilter: Adjust return type and docs
>   virTypedParamsGetStringList: Refactor and adjust docs
>   virTypedParamsFilter: Introduce option to filter also by type
>   virTypedParamsGetStringList: Ensure that returned array is NULL if
>     there are no matching fields
>   virTypedParamsGetStringList: Ensure that returned string list is
>     NULL-terminated
>   qemuMigrationSrcBeginPhaseBlockDirtyBitmaps: Use
>     qemuMigrationAnyCopyDisk()
>   qemu: migration: Don't log 'nmigrate_disks'
>   qemu: migration: Avoid use of 'nmigration_disks'
>   qemu: migration: Extract validation of disk target list
>   qemu: migration: Remove 'nmigration_disks' variable from all places

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>

>   qemu: Introduce and wire in
>     'VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES'
>   virsh: Add support for VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES
>     migration parameter

See comments for these two patches.

Pavel