mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
qemu: block: Don't lookup node names if they are already known
Move the check that skips node name detection if they are already present earlier so that the hash table lookup is skipped.
This commit is contained in:
parent
32d6c7386d
commit
8b2fd3b148
@ -272,13 +272,13 @@ qemuBlockDiskDetectNodes(virDomainDiskDefPtr disk,
|
||||
qemuBlockNodeNameBackingChainDataPtr entry = NULL;
|
||||
virStorageSourcePtr src = disk->src;
|
||||
|
||||
if (!(entry = virHashLookup(disktable, disk->info.alias)))
|
||||
return 0;
|
||||
|
||||
/* don't attempt the detection if the top level already has node names */
|
||||
if (src->nodeformat || src->nodestorage)
|
||||
return 0;
|
||||
|
||||
if (!(entry = virHashLookup(disktable, disk->info.alias)))
|
||||
return 0;
|
||||
|
||||
while (src && entry) {
|
||||
if (src->nodeformat || src->nodestorage) {
|
||||
if (STRNEQ_NULLABLE(src->nodeformat, entry->nodeformat) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user