From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id BA9DA1FF16F for ; Tue, 8 Jul 2025 16:17:26 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6ECFC1894A; Tue, 8 Jul 2025 16:18:09 +0200 (CEST) Date: Tue, 8 Jul 2025 16:18:06 +0200 (CEST) From: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= To: "DERUMIER, Alexandre" , "pve-devel@lists.proxmox.com" Message-ID: <112250198.3649.1751984286431@webmail.proxmox.com> In-Reply-To: <67627e7904281520e1f7152657ed00c7ba3c138b.camel@groupe-cyllene.com> References: <20250704064507.511884-1-alexandre.derumier@groupe-cyllene.com> <2064112819.2237.1751629966392@webmail.proxmox.com> <27854af70a4fe3a7765d2760098e2f82f3475f17.camel@groupe-cyllene.com> <743744269.3403.1751972360824@webmail.proxmox.com> <67627e7904281520e1f7152657ed00c7ba3c138b.camel@groupe-cyllene.com> MIME-Version: 1.0 X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.6-Rev79 X-Originating-Client: open-xchange-appsuite X-SPAM-LEVEL: Spam detection results: 0 AWL 0.045 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH pve-storage 08/10] qcow2: add external snapshot support X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Cc: "t.lamprecht@proxmox.com" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" > DERUMIER, Alexandre hat am 08.07.2025 15:42 CEST geschrieben: > > > >>okay, that means we instead need to become more strict with 'snapext' > >>storages and restrict the volnames there.. maybe to (vm-|base-)-XXX- > >>*.fmt? > > $plugin->parse_volname($volname) don't have $scfg param currently, > > Do you want to extend it ? (and do change in every plugin) ah, I forgot about that.. I guess what we could do instead would be to restrict parsing to (vm|base)-XXX- in general there, which would break people who have manually created such volumes and manually assigned them to VMs. we can detect and warn about that in the upgrade script, and let them move the disk (or manually rename) before the upgrade.. we'd run into a similar issue with another planned change anyway, I'll double check that there are no complications arising from that, but you can assume for now that it's fine to restrict the volname like that going forward. > or can I call > > my ($storeid, $volname) = parse_volume_id($volid); > my $scfg = storage_config($cfg, $storeid); > > in the Plugin::parse_namedir ? no, that is bad ;) > > > sub parse_name_dir { > my $name = shift; > > if ($scfg->{'external-snapshots'} && $name =~ m/^((vm|base)-(\d+)- > \S+\.(raw|qcow2|vmdk|subvol))$/) { > return ($1, $4, $2 eq 'base'); # (name, format, isBase) > } elsif ($name =~ m!^((base-)?[^/\s]+\.(raw|qcow2|vmdk|subvol))$!) > { > return ($1, $3, $2); # (name, format, isBase) > } > > die "unable to parse volume filename '$name'\n"; > } _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel