Re: [PATCH v2 6/8] hostdev: Introduce virDomainHostdevSubsysSCSIiSCSI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 07/23/2014 10:08 PM, Eric Blake wrote:
> On 07/21/2014 02:47 PM, John Ferlan wrote:
>> Create the structures and API's to hold and manage the iSCSI host device.
>> This extends the 'scsi_host' definitions added in commit id '5c811dce'.
>> A future patch will add the XML parsing, but that code requires some
>> infrastructure to be in place first in order to handle the differences
>> between a 'scsi_host' and an 'iSCSI host' device.
>>
>> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
>> ---
>>  src/conf/domain_audit.c          |  20 +++-
>>  src/conf/domain_conf.c           |  47 ++++++++-
>>  src/conf/domain_conf.h           |  20 ++++
>>  src/qemu/qemu_cgroup.c           |  35 ++++---
>>  src/qemu/qemu_command.c          |  74 ++++++++++++---
>>  src/qemu/qemu_hotplug.c          |  36 +++++--
>>  src/security/security_apparmor.c |   6 ++
>>  src/security/security_dac.c      |  12 +++
>>  src/security/security_selinux.c  |  12 +++
>>  src/util/virhostdev.c            | 200 +++++++++++++++++++++++++--------------
>>  10 files changed, 349 insertions(+), 113 deletions(-)
>>
> 
>>  static int
>> +virDomainHostdevMatchSubsysSCSIiSCSI(virDomainHostdevDefPtr first,
>> +                                     virDomainHostdevDefPtr second)
>> +{
>> +    virDomainHostdevSubsysSCSIiSCSIPtr first_iscsisrc =
>> +        &first->source.subsys.u.scsi.u.iscsi;
>> +    virDomainHostdevSubsysSCSIiSCSIPtr second_iscsisrc =
>> +        &second->source.subsys.u.scsi.u.iscsi;
>> +
>> +    if (STREQ(first_iscsisrc->hosts[0].name, second_iscsisrc->hosts[0].name) &&
> 
> Do you need to match nhosts, or is nhosts always 1?
> 
> 

Only 1 host is supported (same as for a disk XML iSCSI resource). This
will be seen in patch 8 in virDomainHostdevSubsysSCSIiSCSIDefParseXML()

John

Going to push the first 6 patches shortly - thanks for the reviews so far.

>> +
>> +    /* Only delete the devices which are marked as being used by @name,
>> +     * because qemuProcessStart could fail on the half way. */
> 
> Sounds funny; maybe "could fail half way through"
> 
> 
>> -
>> -        /* Only delete the devices which are marked as being used by @name,
>> -         * because qemuProcessStart could fail on the half way. */
> 
> Then again, it's just code motion.
> 
> Conditional ACK, if the match function doesn't need to track nhosts.
> 
> 


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]