On 06/22/2015 05:05 PM, John Ferlan wrote:
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(-)


For what it's worth, other than the one doc change suggestion, the rest looks (and works) fine to me.

Reviewed-by: Eric Farman <far...@linux.vnet.ibm.com>

 - Eric

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

Reply via email to