From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 9DA1D1FF15E for <inbox@lore.proxmox.com>; Tue, 11 Feb 2025 17:10:02 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B43EE360B; Tue, 11 Feb 2025 17:08:47 +0100 (CET) From: Daniel Kral <d.kral@proxmox.com> To: pve-devel@lists.proxmox.com Date: Tue, 11 Feb 2025 17:08:14 +0100 Message-Id: <20250211160825.254167-21-d.kral@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250211160825.254167-1-d.kral@proxmox.com> References: <20250211160825.254167-1-d.kral@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.011 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH qemu-server v2 15/15] tree-wide: add todos for breaking content type assertions X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> 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.kral@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