Re: [PATCH v1 21/31] domain_conf: Introduce virDomainDefHasNVMeDisk

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

 



On Thu, Jul 11, 2019 at 17:54:08 +0200, Michal Privoznik wrote:
> This function will return true if any of disks (or their backing
> chain) for given domain contains an NVMe disk.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.c   | 14 ++++++++++++++
>  src/conf/domain_conf.h   |  3 +++
>  src/libvirt_private.syms |  1 +
>  3 files changed, 18 insertions(+)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 73f5e1fa0f..1b6ee3bfa6 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -31431,6 +31431,20 @@ virDomainDefHasManagedPR(const virDomainDef *def)
>  }
>  
>  
> +bool
> +virDomainDefHasNVMeDisk(const virDomainDef *def)
> +{
> +    size_t i;
> +
> +    for (i = 0; i < def->ndisks; i++) {
> +        if (virStorageSourceChainHasNVMe(def->disks[i]->src))
> +            return true;
> +    }
> +
> +    return false;

Same comment as in previous patch.

ACK.

Attachment: signature.asc
Description: PGP signature

--
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]

  Powered by Linux