[libvirt] [PATCH RESEND 0/4] Pre-create storage on live migration

Michal Privoznik mprivozn at redhat.com
Fri Sep 13 06:31:38 UTC 2013

[Resending due to some list difficulties]

Currently users are required to pre-create storage on their own upon migration.
This patch set implements the feature for RAW, QCOW and QCOW2 images. While for
the RAW fallocate() is used (so we are guaranteed subsequent write() won't fail
with ENOSPC, for the latter two we have no other option than using qemu-img,
which uses ftruncate(). On the other hand, this is not such big deal. If the
spare runs out as a domain is migrating, the migration is aborted, and
pre-created storage unlink()-ed. There's no difference to what will happen if
user will pre-create storage by hand.


Michal Privoznik (4):
  qemu: Expose file opening functions
  qemu_domain: Introduce qemuDomainGetDiskBlockInfo
  qemu_migration: Check size prerequisites
  qemu_migration: Unlink pre-created storage on error

 src/qemu/qemu_domain.c    | 299 ++++++++++++++++++++++++++++++++++++++++++++-
 src/qemu/qemu_domain.h    |  16 +++
 src/qemu/qemu_driver.c    | 276 ++---------------------------------------
 src/qemu/qemu_migration.c | 304 +++++++++++++++++++++++++++++++++++++++++++++-
 src/qemu/qemu_process.c   |   8 ++
 5 files changed, 627 insertions(+), 276 deletions(-)


More information about the libvir-list mailing list