On 07/16/2015 08:31 AM, Ján Tomko wrote:
On Mon, Jun 22, 2015 at 05:05:04PM -0400, John Ferlan wrote:
> Modify virDomainDriveAddressIsUsedBy{Disk|Hostdev} and
> virDomainSCSIDriveAddressIsUsed to take 'bus' and 'target'
> parameters. Will be used by future patches for more complete
> address conflict checks
>
Are all of the address components equal? I mean, if w.x.y.z is occupied,
then changing just one of those gets an address that might be available.
(I am thinking about PCI where some devices require a whole slot to
themselves).
Don't believe that's logical/possible in SCSI - that is I'm not aware
of
any device that takes up the entire slot. As I understand the SCSI
addresses bus and target can validly be non zero.Physical target
assignment rules indicate to assign in ascending order according to
physical location and units are component of each target. So they can be
non zero. Physical target assignment rules indicate to assign in
ascending order according to physical location and units are component
of each target. So they can be non zero.
Of course I've forgotten what exactly caused me to add bus & target to
the comparison, but I think it was due to the check added in patch3 to
ensure the provided <hostdev> address didn't conflict with some existing
disk address. While our default rules stipulate using bus = target = 0,
nothing stops someone from using "target=1". And without bus & target
being included in the comparison a <disk> address using
<address type='drive' controller='0' bus='0'
target='1' unit='0'/>
it may appear to conflict with a <hostdev> using :
<address type='drive' controller='0' bus='0'
target='0' unit='0'/>
Once patch3 was added.
I do note that the comments to both functions still had
$controller:0:0:$unit and adjusted those as well to be
$controller:$bus:$target:$unit
John
> Signed-off-by: John Ferlan <jferlan(a)redhat.com>
> ---
> src/conf/domain_conf.c | 24 ++++++++++++++++--------
> 1 file changed, 16 insertions(+), 8 deletions(-)
>
ACK
Jan