From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH qemu-server] api: create disks: only log cleanup if it's actually done
Date: Thu, 13 Mar 2025 10:32:07 +0100 [thread overview]
Message-ID: <rsmhk3z5k62tlkdghlisuqyx2hrpqiuxilfrwdcelmck2smjlr@wtgev7qyd5sd> (raw)
In-Reply-To: <20250313083026.428139-1-d.csapak@proxmox.com>
applied, thanks
On Thu, Mar 13, 2025 at 09:30:26AM +0100, Dominik Csapak wrote:
> we cleaned up extracted images, but logged it even for non extracted
> ones. Only log this when we actually cleaned anything up.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> PVE/API2/Qemu.pm | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index dc8915a7..156b1c7b 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -492,8 +492,10 @@ my sub create_disks : prototype($$$$$$$$$$$) {
> = $import_from_volid->($storecfg, $source, $dest_info, $vollist);
>
> # remove extracted volumes after importing
> - PVE::Storage::vdisk_free($storecfg, $source) if $needs_extraction;
> - print "cleaned up extracted image $source\n";
> + if ($needs_extraction) {
> + PVE::Storage::vdisk_free($storecfg, $source);
> + print "cleaned up extracted image $source\n";
> + }
> @$vollist = grep { $_ ne $source } @$vollist;
> };
> die "cannot import from '$source' - $@" if $@;
> --
> 2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-03-13 9:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 8:30 [pve-devel] " Dominik Csapak
2025-03-13 9:32 ` Wolfgang Bumiller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rsmhk3z5k62tlkdghlisuqyx2hrpqiuxilfrwdcelmck2smjlr@wtgev7qyd5sd \
--to=w.bumiller@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal