mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
virstoragefile: Introduce virStorageSourceChainHasNVMe
This function will return true if there's a storage source of type VIR_STORAGE_TYPE_NVME, or false otherwise. 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
8cd7196974
commit
a88eef7c48
@ -3074,6 +3074,7 @@ virStoragePRDefIsManaged;
|
||||
virStoragePRDefParseXML;
|
||||
virStorageSourceBackingStoreClear;
|
||||
virStorageSourceChainHasManagedPR;
|
||||
virStorageSourceChainHasNVMe;
|
||||
virStorageSourceClear;
|
||||
virStorageSourceCopy;
|
||||
virStorageSourceFindByNodeName;
|
||||
|
@ -2136,6 +2136,20 @@ virStorageSourceNVMeDefFree(virStorageSourceNVMeDefPtr def)
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
virStorageSourceChainHasNVMe(const virStorageSource *src)
|
||||
{
|
||||
const virStorageSource *n;
|
||||
|
||||
for (n = src; virStorageSourceIsBacking(n); n = n->backingStore) {
|
||||
if (n->type == VIR_STORAGE_TYPE_NVME)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
virSecurityDeviceLabelDefPtr
|
||||
virStorageSourceGetSecurityLabelDef(virStorageSourcePtr src,
|
||||
const char *model)
|
||||
|
@ -433,6 +433,8 @@ virStorageSourceChainHasManagedPR(virStorageSourcePtr src);
|
||||
void virStorageSourceNVMeDefFree(virStorageSourceNVMeDefPtr def);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virStorageSourceNVMeDef, virStorageSourceNVMeDefFree);
|
||||
|
||||
bool virStorageSourceChainHasNVMe(const virStorageSource *src);
|
||||
|
||||
virSecurityDeviceLabelDefPtr
|
||||
virStorageSourceGetSecurityLabelDef(virStorageSourcePtr src,
|
||||
const char *model);
|
||||
|
Loading…
x
Reference in New Issue
Block a user