mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
Fix a crash when cloning a volume with no backing store
Introduced by commit 15213d1
, not yet released.
This commit is contained in:
parent
221b1828f9
commit
be3cbecd0e
@ -887,7 +887,7 @@ virStorageBackendCreateQemuImgCmd(virConnectPtr conn,
|
||||
* backing store, not really sure what use it serves though, and it
|
||||
* may cause issues with lvm. Untested essentially.
|
||||
*/
|
||||
if (inputvol &&
|
||||
if (inputvol && inputvol->target.backingStore &&
|
||||
STRNEQ_NULLABLE(inputvol->target.backingStore->path,
|
||||
vol->target.backingStore->path)) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
|
@ -0,0 +1,2 @@
|
||||
qemu-img convert -f raw -O qcow2 -o encryption=on \
|
||||
/var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img
|
@ -235,6 +235,9 @@ mymain(void)
|
||||
DO_TEST("pool-dir", "vol-qcow2-nobacking",
|
||||
"pool-dir", "vol-file",
|
||||
"qcow2-nobacking-convert-prealloc", flags, FMT_OPTIONS);
|
||||
DO_TEST_FAIL("pool-dir", "vol-qcow2",
|
||||
"pool-dir", "vol-file",
|
||||
"qcow2-convert-nobacking", 0, FMT_OPTIONS);
|
||||
DO_TEST_FAIL("pool-dir", "vol-qcow2",
|
||||
"pool-dir", "vol-file",
|
||||
"qcow2-convert-prealloc", flags, FMT_OPTIONS);
|
||||
|
Loading…
Reference in New Issue
Block a user