]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virStorageFileProbeGetMetadata: Do not partially skip probing of the image
authorPeter Krempa <pkrempa@redhat.com>
Thu, 23 Nov 2023 16:03:32 +0000 (17:03 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 27 Nov 2023 09:12:34 +0000 (10:12 +0100)
Since we consider the failure of parsing the backing store to be
actually success based on the value we return to the caller, we should
continue parsing also features and the 'compat' field so that we don't
have a partial definition if e.g. the backing store format is not known.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/storage_file/storage_file_probe.c

index c73f533d2da6fe78363fc3ab46fbd3a0ca773e99..4cf052c03d163eba438e1b00193d0efc2c037311 100644 (file)
@@ -955,13 +955,9 @@ virStorageFileProbeGetMetadata(virStorageSource *meta,
 
     VIR_FREE(meta->backingStoreRaw);
     if (fileTypeInfo[meta->format].getBackingStore != NULL) {
-        int store = fileTypeInfo[meta->format].getBackingStore(&meta->backingStoreRaw,
-                                                               &format,
-                                                               buf, len);
+        fileTypeInfo[meta->format].getBackingStore(&meta->backingStoreRaw,
+                                                   &format, buf, len);
         meta->backingStoreRawFormat = format;
-
-        if (store == BACKING_STORE_INVALID)
-            return 0;
     }
 
     g_clear_pointer(&meta->features, virBitmapFree);