From: "Max R. Carrara" <m.carrara@proxmox.com>
To: "Thomas Ellmenreich" <t.ellmenreich@proxmox.com>,
<pve-devel@lists.proxmox.com>
Subject: Re: [PATCH qemu-server v2 3/3] removed some unnecessary undef checks.
Date: Fri, 07 Aug 2026 11:33:30 +0200 [thread overview]
Message-ID: <DKILWSH6CEZW.2L7053ERVM5HR@proxmox.com> (raw)
In-Reply-To: <20260805082122.43184-4-t.ellmenreich@proxmox.com>
^ Small note regarding commit summaries and messages: We use present
tense with active voice / imperative mood and don't add any fullstops in
summaries.
So, the summary line should instead say:
remove some unnecessary undef checks
IMO this can be changed when applying the patch, no need for a refresh
here either.
On Wed Aug 5, 2026 at 10:21 AM CEST, Thomas Ellmenreich wrote:
> Signed-off-by: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
> ---
> src/PVE/QemuServer.pm | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
> index 0e998cbe..3141b298 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -1818,11 +1818,10 @@ sub destroy_vm {
> { include_unused => 1 },
> sub {
> my ($ds, $drive) = @_;
> - return if drive_is_cdrom($drive);
>
> - my $volid = $drive->{file};
> - return if !$volid || drive_has_absolute_path($drive);
> + return if drive_is_cdrom($drive) || drive_has_absolute_path($drive);
>
> + my $volid = $drive->{file};
> my $result = eval { PVE::Storage::volume_is_base_and_used($storecfg, $volid) };
> # early check, removal of volume will fail later anyway, so warning here is fine
> log_warn("failed to check if volume '$volid' is used by linked clones: $@")
> @@ -1839,8 +1838,7 @@ sub destroy_vm {
> return if drive_is_cdrom($drive, 1);
>
> my $volid = $drive->{file};
> - return if !$volid || drive_has_absolute_path($drive);
> - return if $volids->{$volid};
> + return if drive_has_absolute_path($drive) || $volids->{$volid};
>
> my ($path, $owner) = eval { PVE::Storage::path($storecfg, $volid) };
> log_warn("failed to get path and owner of volume '$volid': $@") if $@;
> @@ -6510,11 +6508,9 @@ my $restore_cleanup_oldconf = sub {
> sub {
> my ($ds, $drive) = @_;
>
> - return if drive_is_cdrom($drive, 1);
> + return if drive_is_cdrom($drive, 1) || drive_has_absolute_path($drive);
>
> my $volid = $drive->{file};
> - return if !$volid || drive_has_absolute_path($drive);
> -
> my ($path, $owner) = PVE::Storage::path($storecfg, $volid);
> return if !$path || !$owner || ($owner != $vmid);
>
prev parent reply other threads:[~2026-08-07 9:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 8:21 [PATCH qemu-server v2 0/3] refactor of volume_id classification Thomas Ellmenreich
2026-08-05 8:21 ` [PATCH qemu-server v2 1/3] move verify_volume_id_or_* format registrations into Drive submodule Thomas Ellmenreich
2026-08-05 8:21 ` [PATCH qemu-server v2 2/3] add new classify_drive_file utility Thomas Ellmenreich
2026-08-07 9:30 ` Max R. Carrara
2026-08-07 9:54 ` Thomas Ellmenreich
2026-08-10 8:51 ` Elias Huhsovitz
2026-08-05 8:21 ` [PATCH qemu-server v2 3/3] removed some unnecessary undef checks Thomas Ellmenreich
2026-08-07 9:33 ` Max R. Carrara [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=DKILWSH6CEZW.2L7053ERVM5HR@proxmox.com \
--to=m.carrara@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.ellmenreich@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.