mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
util: storage: Copy driver type when initializing chain element
virStorageSourceInitChainElement initializes a new storage chain element for use as a new disk source. If the new element doesn't contain the driver name, copy it from the old source. This fixes issue where a disk would forget the driver after a snapshot. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140984
This commit is contained in:
parent
98fd3b7f0b
commit
865421c94a
@ -1927,6 +1927,10 @@ virStorageSourceInitChainElement(virStorageSourcePtr newelem,
|
||||
virStorageSourceSeclabelsCopy(newelem, old) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!newelem->driverName &&
|
||||
VIR_STRDUP(newelem->driverName, old->driverName) < 0)
|
||||
goto cleanup;
|
||||
|
||||
newelem->shared = old->shared;
|
||||
newelem->readonly = old->readonly;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user