提交 be3cbecd 编写于 作者: J Ján Tomko

Fix a crash when cloning a volume with no backing store

Introduced by commit 15213d1e, not yet released.
上级 221b1828
......@@ -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",
......
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册