backup: parse backup hints: use volume format from storage layer

Avoid using the extension based qemu_img_format() helper. Failure is
not critical, because this is just the hint for what format the
restored target image should be allocated with, so fallback to 'raw'.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2024-12-06 17:25:45 +01:00 committed by Fabian Grünbichler
parent dfdb1656f6
commit 2d62759f6c

View File

@ -6825,7 +6825,7 @@ my $parse_backup_hints = sub {
my ($storeid, $volname) = PVE::Storage::parse_volume_id($drive->{file});
$storeid = $options->{storage} if defined ($options->{storage});
my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
my $format = qemu_img_format($scfg, $volname); # has 'raw' fallback
my $format = eval { checked_volume_format($storecfg, $drive->{file}) } // 'raw';
$check_storage->($storeid, $scfg); # permission and content type check