mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user