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 <jfer...@redhat.com>
> ---
>  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 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.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to