]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fix bus and lun checks when scsi-disk.channel not present v1.2.15-rc2
authorJohn Ferlan <jferlan@redhat.com>
Thu, 30 Apr 2015 19:52:03 +0000 (15:52 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 30 Apr 2015 20:21:38 +0000 (16:21 -0400)
commit63a368012df8009023dc63b2b2a58f1ca2668f97
tree94e9649e5bc040e77f9bad841ca8fc1326ed0852
parentbb3cc43cd45be1f666adabc977653a2084d2ac3a
qemu: Fix bus and lun checks when scsi-disk.channel not present

Found by Laine and discussed a bit on internal IRC.

Commit id c56fe7f1d6 added support for creating a command line to support
scsi-disk.channel.

Series was here:
http://www.redhat.com/archives/libvir-list/2012-February/msg01052.html

Which pointed to a design proposal here:
http://permalink.gmane.org/gmane.comp.emulators.libvirt/50428

Which states (in part):

Libvirt should check for the QEMU "scsi-disk.channel" property.  If it
is unavailable, QEMU will only support channel=lun=0 and 0<=target<=7.

However, the check added was ensuring that bus != lun *and* bus != 0. So
if bus == lun and both were non zero, we'd never make the second check.
Changing this to an *or* check fixes the check, but still is less readable
than the just checking each for 0
src/qemu/qemu_command.c