[libvirt] [PATCH v1 21/31] domain_conf: Introduce virDomainDefHasNVMeDisk
Peter Krempa
pkrempa at redhat.com
Tue Jul 16 14:23:14 UTC 2019
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 at redhat.com>
> ---
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190716/5dc9f698/attachment-0001.sig>
More information about the libvir-list
mailing list