Add TODO comments to calls to `vdisk_alloc`, which should be done for consistency, but would be breaking in the current release since both snapshot state files and fleecing images are allowed on storages, which do not support VM images and work without errors currently.
Signed-off-by: Daniel Kral <d.k...@proxmox.com> --- changes since v1: - made this TODO statements instead of changes as these would break the existing API as both actions are currently totally allowed PVE/QemuConfig.pm | 1 + PVE/VZDump/QemuServer.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm index 45660abb..28f31b6d 100644 --- a/PVE/QemuConfig.pm +++ b/PVE/QemuConfig.pm @@ -226,6 +226,7 @@ sub __snapshot_save_vmstate { my $name = "vm-$vmid-state-$snapname"; $name .= ".raw" if $scfg->{path}; # add filename extension for file base storage + # TODO PVE 9: add assertion for supported content type my $statefile = PVE::Storage::vdisk_alloc($storecfg, $target, $vmid, 'raw', $size*1024, { name => $name, }); diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm index c5c94a91..42e91bc2 100644 --- a/PVE/VZDump/QemuServer.pm +++ b/PVE/VZDump/QemuServer.pm @@ -560,6 +560,7 @@ my sub allocate_fleecing_images { my $size = PVE::Tools::convert_size($di->{size}, 'b' => 'kb'); + # TODO PVE 9: add assertion for supported content type $di->{'fleece-volid'} = PVE::Storage::vdisk_alloc( $self->{storecfg}, $fleecing_storeid, $vmid, $format, $size, { name => $name, -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel