mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 08:05:16 +00:00
domain_conf: Introduce virDomainDefHasNVMeDisk
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@redhat.com> ACKed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
a88eef7c48
commit
abd7c4c746
@ -31479,6 +31479,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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
virDomainDefHasVFIOHostdev(const virDomainDef *def)
|
virDomainDefHasVFIOHostdev(const virDomainDef *def)
|
||||||
{
|
{
|
||||||
|
@ -3667,6 +3667,9 @@ virDomainDiskGetDetectZeroesMode(virDomainDiskDiscard discard,
|
|||||||
bool
|
bool
|
||||||
virDomainDefHasManagedPR(const virDomainDef *def);
|
virDomainDefHasManagedPR(const virDomainDef *def);
|
||||||
|
|
||||||
|
bool
|
||||||
|
virDomainDefHasNVMeDisk(const virDomainDef *def);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
virDomainDefHasVFIOHostdev(const virDomainDef *def);
|
virDomainDefHasVFIOHostdev(const virDomainDef *def);
|
||||||
|
|
||||||
|
@ -310,6 +310,7 @@ virDomainDefHasManagedPR;
|
|||||||
virDomainDefHasMdevHostdev;
|
virDomainDefHasMdevHostdev;
|
||||||
virDomainDefHasMemballoon;
|
virDomainDefHasMemballoon;
|
||||||
virDomainDefHasMemoryHotplug;
|
virDomainDefHasMemoryHotplug;
|
||||||
|
virDomainDefHasNVMeDisk;
|
||||||
virDomainDefHasUSB;
|
virDomainDefHasUSB;
|
||||||
virDomainDefHasVcpusOffline;
|
virDomainDefHasVcpusOffline;
|
||||||
virDomainDefHasVFIOHostdev;
|
virDomainDefHasVFIOHostdev;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user