]> xenbits.xensource.com Git - libvirt.git/commit
domain_conf: Relax SCSI addr used check
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 28 Aug 2019 09:41:49 +0000 (11:41 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 23 Oct 2019 08:29:52 +0000 (10:29 +0200)
commitc8007fdc5d2ce43fec2753cda60fb4963f55abd5
tree6c83050dceaa03ed6c5dffdfa5480d417c526740
parent9cddc6e8ee9d9ce62dd20a6317c3148f4cd1c0e9
domain_conf: Relax SCSI addr used check

In domain_conf.c we have virDomainSCSIDriveAddressIsUsed()
function which returns true or false if given drive address is
already in use for given domain config or not. However, it also
takes a shortcut and returns true (meaning address in use) if the
unit number equals 7. This is because for some controllers this
is reserved address. The limitation comes mostly from vmware and
applies to lsilogic, buslogic, spapr-vscsi and vmpvscsi models.
On the other hand, we were not checking for the maximum unit
number (aka LUN number) which is also relevant and differs from
model to model.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/domain_conf.c