]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: driver: Fix cold-update of removable storage devices
authorPeter Krempa <pkrempa@redhat.com>
Thu, 12 Mar 2015 16:12:12 +0000 (17:12 +0100)
committerCole Robinson <crobinso@redhat.com>
Tue, 28 Apr 2015 15:06:41 +0000 (11:06 -0400)
commit7d11e8de0b7101ddb712cc26189567680b951a95
treee9f8ab84cb1381daf2e22af38630202a7364d9ac
parentb41d99b72ebeb172cc9a749882fdfaf75daa5ff2
qemu: driver: Fix cold-update of removable storage devices

Only selected fields from the disk source were copied when cold updating
source in a CDROM drive. When such drive was backed by a network file
this resulted into corruption of the definition:

    <disk type='network' device='cdrom'>
      <driver name='qemu' type='raw' cache='none'/>
      <source protocol='gluster' name='gluster-vol1(null)'>
        <host name='localhost'/>
      </source>
      <target dev='vdc' bus='virtio'/>
      <readonly/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </disk>

Update the whole source instead of cherry-picking elements.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1166024
(cherry picked from commit d0dc6c036914da4905c3f483be3036014a38fe9b)
src/qemu/qemu_driver.c