mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemuDomainGetStorageSourceByDevstr: Lookup also '<dataStore>'
The <dataStore> volumes have their own 'id' so we need to be able to look them up for the given image chain. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
515ed143ec
commit
976300fdf4
@ -9260,12 +9260,18 @@ qemuDomainGetStorageSourceByDevstr(const char *devstr,
|
||||
for (n = disk->src; virStorageSourceIsBacking(n); n = n->backingStore) {
|
||||
if (n->id == idx)
|
||||
return n;
|
||||
|
||||
if (n->dataFileStore && n->dataFileStore->id == idx)
|
||||
return n->dataFileStore;
|
||||
}
|
||||
|
||||
if (disk->mirror) {
|
||||
for (n = disk->mirror; virStorageSourceIsBacking(n); n = n->backingStore) {
|
||||
if (n->id == idx)
|
||||
return n;
|
||||
|
||||
if (n->dataFileStore && n->dataFileStore->id == idx)
|
||||
return n->dataFileStore;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9281,6 +9287,9 @@ qemuDomainGetStorageSourceByDevstr(const char *devstr,
|
||||
for (n = backupdisk->store; virStorageSourceIsBacking(n); n = n->backingStore) {
|
||||
if (n->id == idx)
|
||||
return n;
|
||||
|
||||
if (n->dataFileStore && n->dataFileStore->id == idx)
|
||||
return n->dataFileStore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user