]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuBlockReopenAccess: Don't require backing chain terminator for non-chained images
authorPeter Krempa <pkrempa@redhat.com>
Tue, 26 Nov 2024 08:10:10 +0000 (09:10 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 28 Nov 2024 09:27:55 +0000 (10:27 +0100)
Add an exception for image formats not supporting backing images so that
they can be reopened RW/RO without the need for adding a terminating
virStorageSource as they simply can't have a backing image.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_block.c

index a7c8be8d8b8cf1b9a15c7743335a59be01a3c3de..af317a1f1f6891b624620e3ee77be9512d4f8c6f 100644 (file)
@@ -3182,7 +3182,7 @@ qemuBlockReopenAccess(virDomainObj *vm,
 
     /* If we are lacking the object here, qemu might have opened an image with
      * a node name unknown to us */
-    if (!src->backingStore) {
+    if (src->format >= VIR_STORAGE_FILE_BACKING && !src->backingStore) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
                        _("can't reopen image with unknown presence of backing store"));
         return -1;