[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 0/5]Add startupPolicy attribute support for hard disks



On 2013年03月18日 17:10, Guannan Ren wrote:

The set of patches is trying to add 'startupPolicy' attribute support
to the source element of hard disks. Policy levels are using the
mandatory, requisite, optional levels as originally documented.

For the 'optional' policy, there is a little difference from CDROM and
Floppy which only drop its source path, for disks, if missing, the
checking function will drop their definitions, because qemu doesn't
allow missing source path for hard disk.

So, wondering why we need "startupPolicy" for disk not CD-ROM and
FLoppy, a disk not CD-ROM or Floppy with empty source doesn't make
sense, and it should be prohibited even when parsing (we do this
indeed). Extending the "startupPolicy" to disk types like 'dir',
'block' makes sense though.


If guest is using per-device boot element for its devices, after dropping
one or more bootable device, the boot order will not be contiguous, the way
here I use is to reorder them to make them contiguous. In this way, I
introduce two new bit-operating functions

virBitmapNextLastSetBit: Search for the last set bit before
certain position.

virBitmapNextLastSetBit: Search for the last clear bit before
certain position.

Guannan Ren(5)
  [PATCH 1/5] conf: add startupPolicy attribute for harddisk
  [PATCH 2/5] util: add two functions to find last set or unset bit in
  [PATCH 3/5] qemu: move disk presence checking before disk chain
  [PATCH 4/5] qemu: drop disk definition if missing and reorder
  [PATCH 5/5] event: add hard disk dropping event reason enum

  docs/formatdomain.html.in    |   9 +++++---
  include/libvirt/libvirt.h.in |   1 +
  src/conf/domain_conf.c       |  21 +++++++++++++------
  src/conf/domain_conf.h       |   1 +
  src/libvirt_private.syms     |   2 ++
  src/qemu/qemu_domain.c       | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
  src/qemu/qemu_process.c      |   7 ++++---
  src/util/virbitmap.c         |  96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  src/util/virbitmap.h         |   6 ++++++
  tests/virbitmaptest.c        |  51 +++++++++++++++++++++++++++++++++++++++++++++-
  10 files changed, 276 insertions(+), 24 deletions(-)

--
libvir-list mailing list
libvir-list redhat com
https://www.redhat.com/mailman/listinfo/libvir-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]