]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Adjust size for qcow2/qed if not on sector boundary
authorJohn Ferlan <jferlan@redhat.com>
Mon, 12 May 2014 14:21:09 +0000 (10:21 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 13 May 2014 11:26:03 +0000 (07:26 -0400)
commit87388d688d2dffd904f653b6860cf3df1633f6b0
treeda0a809d5b2584bb9d5ffc44f288dd47a29bc317
parent85a117a57991868b50b606e9ec59a4e51ee8a118
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.
src/qemu/qemu_driver.c