virStorageFileProbeGetMetadata: Do not partially skip probing of the image

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>
This commit is contained in:
Peter Krempa 2023-11-23 17:03:32 +01:00
parent 77ef7ede16
commit 943c5758b0

View 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);