]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: don't modify domain on failed blockiotune
authorEric Blake <eblake@redhat.com>
Fri, 4 May 2012 15:43:23 +0000 (09:43 -0600)
committerCole Robinson <crobinso@redhat.com>
Thu, 14 Jun 2012 15:17:17 +0000 (11:17 -0400)
commit282bd9dc619f7514363b59073a1af32f5e0e7dee
tree0701f89ba820d2abf2e5454cb18d1452357c07a2
parenta14f23f05c9a57c1aa567351e05f23b520c6e79b
qemu: don't modify domain on failed blockiotune

If you have a qemu build that lacks the blockio tune monitor command,
then this command:

$ virsh blkdeviotune rhel6u2 hda --total_bytes_sec 1000
error: Unable to change block I/O throttle
error: internal error Unexpected error

fails as expected (well, the error message is lousy), but the next
dumpxml shows that the domain was modified anyway.  Worse, that means
if you save the domain then restore it, the restore will likely fail
due to throttling being unsupported, even though no throttling should
even be active because the monitor command failed in the first place.

* src/qemu/qemu_driver.c (qemuDomainSetBlockIoTune): Check for
error before making modification permanent.
(cherry picked from commit 98cec052882c9acb5e3b8bc3f8e8a37a2cdb2982)
src/qemu/qemu_driver.c