• O
    conf: Generate address for scsi host device automatically · cdb97895
    Osier Yang 提交于
    With unknown good reasons, the attribute "bus" of scsi device
    address is always set to 0, same for attribute "target". (See
    virDomainDiskDefAssignAddress).
    
    Though we might need to change the algorithm to honor "bus"
    and "target" too, that's a different issue. The address generator
    for scsi host device in this patch just follows the unknown
    good reasons, only considering the "controller" and "unit".
    It walks through all scsi controllers and their units, to see
    if the address $controller:0:0:$unit can be used (if not used
    by any disk or scsi host device yet), if found one, it sits on
    it, otherwise, it creates a new controller (actually the controller
    is implicitly created by someone else), and sits on
    $new_controller:0:0:0 instead.
    cdb97895
domain_conf.c 565.7 KB