[libvirt] [PATCH 0/5] Additional SCSI generated device address checks

John Ferlan jferlan at redhat.com
Mon Jun 22 21:05:02 UTC 2015


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

These patches will resolve a couple issues with generation of the
<address type='drive' .../> for a SCSI <disk> and <hostdev>.

The <disk> generation algorithm 'assumes' that when presented with
<target dev='sda'.../> that it can use controller=0 and unit=0 since
sda would conceivably be the first device; however, a <hostdev> could
attempt to assign itself to that address and it doesn't have a target
device name, so it bypasses the virDomainDiskDefDstDuplicates checks
that would normally 'catch' two <disk>'s attempting to use the same name.

Likewise, if a <hostdev> occupies an <address> and we attempt to hotplug
a <disk> without providing an address, the address generation could
attempt to place the disk on the already existing host device.


John Ferlan (5):
  conf: Enforce SCSI hostdev address type
  conf: Add 'bus' and 'target' to SCSI address conflict checks
  conf: Add SCSI hostdev check for disk drive address already in use
  conf: Refactor virDomainDiskDefParseXML to pass vmdef
  conf: Check for hostdev conflicts when assign default disk address

 docs/formatdomain.html.in |   4 +-
 src/conf/domain_conf.c    | 115 ++++++++++++++++++++++++++++++++--------------
 src/conf/domain_conf.h    |   3 +-
 src/qemu/qemu_command.c   |   4 +-
 src/vmx/vmx.c             |  22 +++++----
 src/vmx/vmx.h             |   3 +-
 6 files changed, 101 insertions(+), 50 deletions(-)

-- 
2.1.0




More information about the libvir-list mailing list