[libvirt] [PATCH v3] conf: Generate address for scsi host device automatically
Eric Blake
eblake at redhat.com
Fri May 31 14:09:44 UTC 2013
On 05/31/2013 04:09 AM, Osier Yang wrote:
> 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.
ACK.
> src/conf/domain_conf.c | 202 ++++++++++++++++++---
> .../qemuxml2argv-hostdev-scsi-autogen-address.xml | 95 ++++++++++
> ...qemuxml2xmlout-hostdev-scsi-autogen-address.xml | 106 +++++++++++
> tests/qemuxml2xmltest.c | 2 +
> 4 files changed, 375 insertions(+), 30 deletions(-)
> create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-autogen-address.xml
> create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-autogen-address.xml
Relatively big to be pushing this late after freeze, but it can be
argued that this is a bug fix and worth including in 1.0.6.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130531/5089794b/attachment-0001.sig>
More information about the libvir-list
mailing list