]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: Restore old bandwidth rules when setting new fails
authorLuyao Huang <lhuang@redhat.com>
Wed, 31 Dec 2014 01:34:39 +0000 (09:34 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 6 Jan 2015 12:27:43 +0000 (13:27 +0100)
commit565d049fd1a4f3264a12001467a0bbf3b87a6421
tree3a84a45cd175976e1daee35b96b0be4e1a05a6ba
parenta791599cc69e1a7e2b5f2ca6778ef467470f63ba
qemu: Restore old bandwidth rules when setting new fails

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

When setting new bandwidth limits via
virDomainSetInterfaceParameters, the old ones are cleared first.
However, if setting the new ones fails, the old are already gone
and interface is left in inconsistent state.  Therefore, right
before failing we ought to try to restore the old bandwidth.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
src/qemu/qemu_driver.c