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 27CF51FF136 for ; Mon, 23 Mar 2026 11:31:24 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BA4E811326; Mon, 23 Mar 2026 11:31:40 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 23 Mar 2026 11:31:36 +0100 Message-Id: To: "Lukas Sichert" , Subject: Re: [PATCH storage 1/2] fix #7339: lvmthick: add worker to free space of to be deleted VMs From: =?utf-8?q?Michael_K=C3=B6ppl?= X-Mailer: aerc 0.21.0 References: <20260323101506.56098-1-l.sichert@proxmox.com> <20260323101506.56098-2-l.sichert@proxmox.com> In-Reply-To: <20260323101506.56098-2-l.sichert@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774261850739 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.088 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 Message-ID-Hash: 6LJA4XO475KISVVTRE6KDLZ7ME5EI7DL X-Message-ID-Hash: 6LJA4XO475KISVVTRE6KDLZ7ME5EI7DL X-MailFrom: m.koeppl@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: needs a `make tidy`. also left 2 comment inline On Mon Mar 23, 2026 at 11:14 AM CET, Lukas Sichert wrote: [snip] > - if ($scfg->{saferemove}) { > + if ($scfg->{saferemove} || $scfg->{issue_blkdiscard}) { > for my $name (@$volnames) { > # avoid long running task, so we only rename here > my $cmd =3D ['/sbin/lvrename', $vg, $name, "del-$name"]; > run_command($cmd, errmsg =3D> "lvrename '$vg/$name' error"); > } > - return $zero_out_worker; > + return sub { > + $blkdiscard_worker->($scfg->{saferemove}, $scfg->{issue_blkd= iscard}); > + }; > } else { > for my $name (@$volnames) { > my $cmd =3D ['/sbin/lvremove', '-f', "$vg/$name"]; > @@ -428,6 +436,10 @@ sub properties { > description =3D> "Zero-out data when removing LVs.", > type =3D> 'boolean', > }, > + issue_blkdiscard =3D> { > + description =3D> "Free Storage space when removing LVs.", nit: s/Storage/storage to have the same capitalization as in other description fields > + type =3D> 'boolean', > + }, > 'saferemove-stepsize' =3D> { > description =3D> "Wipe step size in MiB." > . " It will be capped to the maximum supported by the st= orage.", > @@ -453,6 +465,7 @@ sub options { > shared =3D> { optional =3D> 1 }, > disable =3D> { optional =3D> 1 }, > saferemove =3D> { optional =3D> 1 }, > + issue_blkdiscard =3D> { optional =3D> 1 }, I think for new fields we use - instead of _? > 'saferemove-stepsize' =3D> { optional =3D> 1 }, > saferemove_throughput =3D> { optional =3D> 1 }, > content =3D> { optional =3D> 1 },