]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
libvirt/qemu - support persistent modification of devices
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Fri, 22 Apr 2011 03:07:56 +0000 (12:07 +0900)
committerEric Blake <eblake@redhat.com>
Thu, 28 Apr 2011 03:33:58 +0000 (21:33 -0600)
commitda1eba6bc8f58bfce34136710d1979a3a44adb17
tree90e99e127618dd75b94308a3ec2c309323388adf
parent8a6e30f124a65bd7e92b36d20b4dc6b0a2a03b51
libvirt/qemu - support persistent modification of devices

This patch adds functions for modify domain's persistent definition.
To do error recovery in easy way, we use a copy of vmdef and update it.

The whole sequence will be:

  make a copy of domain definition.

  if (flags & MODIFY_CONFIG)
      update copied domain definition
  if (flags & MODIF_LIVE)
      do hotplug.
  if (no error)
      save copied one to the file and update cached definition.
  else
      discard copied definition.

This patch is mixuture of Eric Blake's work and mine.
From: Eric Blake <eblake@redhat.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
(virDomainObjCopyPersistentDef): make a copy of persistent vm definition
(qemuDomainAttach/Detach/UpdateDeviceConfig) : callbacks. now empty
(qemuDomainModifyDeviceFlags): add support for MODIFY_CONFIG and MODIFY_CURRENT
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms
src/qemu/qemu_driver.c