]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Adjust size for qcow2/qed if not on sector boundary
authorJohn Ferlan <jferlan@redhat.com>
Tue, 8 Apr 2014 14:59:09 +0000 (10:59 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 7 May 2014 11:25:16 +0000 (07:25 -0400)
commite3d66229a1026cd33319714c0ededf650cd261c2
tree4798d1dfc9ea26548f0815c17237af713085d500
parentf3be5f0c5004298bb2541b3fb27926c3cb1e5b57
qemu: Adjust size for qcow2/qed if not on sector boundary

https://bugzilla.redhat.com/show_bug.cgi?id=1002813

If qemuDomainBlockResize() is passed a size not on a KiB boundary - that
is passed a size based in bytes (VIR_DOMAIN_BLOCK_RESIZE_BYTES), then
depending on the source format (qcow2 or qed), the value passed must
be on a sector (or 512 byte) boundary. Since other libvirt code quietly
adjusts the capacity values, then do so here as well - of course ensuring
that adjustment still fits.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_driver.c