]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Reject updating unsupported disk information
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 9 Jul 2015 16:28:38 +0000 (18:28 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 20 Jul 2015 09:35:54 +0000 (11:35 +0200)
commit717c99f3602354136ca97edca6afc8dce69aae85
treeac244ff8fcbfb7d57844a00e71b95493d98d3b62
parent0aa81bbdc350f886bd7ca862c10544135e81a8b5
qemu: Reject updating unsupported disk information

If one calls update-device with information that is not updatable,
libvirt reports success even though no data were updated.  The example
used in the bug linked below uses updating device with <boot order='2'/>
which, in my opinion, is a valid thing to request from user's
perspective.  Mainly since we properly error out if user wants to update
such data on a network device for example.

And since there are many things that might happen (update-device on disk
basically knows just how to change removable media), check for what's
changing and moreover, since the function might be usable in other
drivers (updating only disk path is a valid possibility) let's abstract
it for any two disks.

We can't possibly check for everything since for many fields our code
does not properly differentiate between default and unspecified values.
Even though this could be changed, I don't feel like it's worth the
complexity so it's not the aim of this patch.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1007228
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms
src/qemu/qemu_driver.c