From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 6EEA11FF141 for ; Tue, 30 Jun 2026 16:28:54 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 3CC2921447; Tue, 30 Jun 2026 16:28:54 +0200 (CEST) Message-ID: <18119a52-227d-4ceb-9a25-83a4ea3eb9f2@proxmox.com> Date: Tue, 30 Jun 2026 16:28:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH storage v7 1/4] lvm: saferemove: zero out volumes range by range To: Lukas Sichert , pve-devel@lists.proxmox.com References: <20260616101323.24981-1-l.sichert@proxmox.com> <20260616101323.24981-2-l.sichert@proxmox.com> <9d099f5a-3121-4617-be7d-b3aa5e2c6c81@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1782829718414 X-SPAM-LEVEL: Spam detection results: 0 DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: WS733QK2QMHFRW3RTCOPZBGL6QOHKSXC X-Message-ID-Hash: WS733QK2QMHFRW3RTCOPZBGL6QOHKSXC X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Am 30.06.26 um 4:16 PM schrieb Lukas Sichert: > On 2026-06-30 13:49, Fiona Ebner wrote: >> Am 16.06.26 um 12:12 PM schrieb Lukas Sichert: >>> + my $err = undef; >>> + eval { $secure_delete_cmd->($lvmpath); }; >>> + $err = $@ if $@; >>> + >>> + if (!$err) { >> >> Style nit: you could switch the branches and just write >> eval { ... }; >> if (my $err = $@) { > > Yes, for this patch alone the inverted form would be nicer. I kept the > separate '$err' variable intentionally because patch 2/4 adds a discard-only > path that reuses the same error handling. That avoids reshuffling this > block again in the follow-up patch. Ah, makes sense :)