From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: [pve-devel] applied-series: [PATCH FOLLOW-UP qemu-server 1/4] api2: move_disk: use parse_volname to find old volume format
Date: Wed, 16 Jul 2025 15:58:44 +0200 [thread overview]
Message-ID: <6rhlktrnudsrihrxasd7gtjeldrxmsrnhozspqr2ky4eqtkvie@jkwroyid5vpq> (raw)
In-Reply-To: <mailman.1492.1752647555.395.pve-devel@lists.proxmox.com>
Applied the current state with 2 minor fixups and one major change:
I renamed the storage sub to `volume_qemu_snapshot_method()` and its
values to:
┌────────────┬───────────┐
│ previous │ new │
├────────────┼───────────┤
│ "internal" │ "qemu" │
│ "external" │ "mixed" │
│ undef │ "storage" │
└────────────┴───────────┘
Updated the `ApiChangeLog` with descriptions for all of them.
On Wed, Jul 16, 2025 at 08:31:36AM +0200, Alexandre Derumier via pve-devel wrote:
> From: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
> To: pve-devel@lists.proxmox.com
> Subject: [PATCH FOLLOW-UP qemu-server 1/4] api2: move_disk: use
> parse_volname to find old volume format
> Date: Wed, 16 Jul 2025 08:31:36 +0200
> Message-Id: <20250716063153.1647681-2-alexandre.derumier@groupe-cyllene.com>
> X-Mailer: git-send-email 2.39.5
>
> Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
> ---
> src/PVE/API2/Qemu.pm | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
> index 2e6358e4..dbc08737 100644
> --- a/src/PVE/API2/Qemu.pm
> +++ b/src/PVE/API2/Qemu.pm
> @@ -4677,11 +4677,8 @@ __PACKAGE__->register_method({
> die "you can't move a cdrom\n" if PVE::QemuServer::drive_is_cdrom($drive, 1);
>
> my $old_volid = $drive->{file};
> - my $oldfmt;
> my ($oldstoreid, $oldvolname) = PVE::Storage::parse_volume_id($old_volid);
> - if ($oldvolname =~ m/\.(raw|qcow2|vmdk)$/) {
> - $oldfmt = $1;
> - }
> + my $oldfmt = (PVE::Storage::parse_volname($storecfg, $old_volid))[6];
>
> die "you can't move to the same storage with same format\n"
> if $oldstoreid eq $storeid && (!$format || !$oldfmt || $oldfmt eq $format);
> --
> 2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-16 13:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250716063153.1647681-1-alexandre.derumier@groupe-cyllene.com>
2025-07-16 6:31 ` [pve-devel] " Alexandre Derumier via pve-devel
2025-07-16 13:58 ` Wolfgang Bumiller [this message]
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 01/14] helpers: make qemu_img* storage config independent Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP qemu-server 2/4] blockdev_rename: remove old left-over rename() Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 02/14] helpers: move qemu_img* to Common module Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP qemu-server 3/4] generate_backing_blockdev: use current_sub for private recursive Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 03/14] rename_snapshot: fix parameter checks Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP qemu-server 4/4] blockdev_external_snapshot: rework to avoid $running param Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 04/14] lvm snapshot: activate volume Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 05/14] common: fix qemu_img_resize Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 06/14] plugin: volume_export: don't allow export of external snapshots Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 07/14] lvmplugin: alloc_snap_image: die if file_size_info return empty size Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 08/14] lvmplugin: snapshot: use relative path for backing image Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 09/14] plugin|lvmplugin: don't allow volume rename if external snapshots exist Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 10/14] lvmplugin: add volume_snapshot_info Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 11/14] plugin: lvmplugin: add parse_snap_name Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 12/14] plugin : improve parse_namedir warning Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 13/14] lvmplugin: add external-snapshots option && forbid creation of qcow2 volumes without it Alexandre Derumier via pve-devel
2025-07-16 6:31 ` [pve-devel] [PATCH FOLLOW-UP storage 14/14] storage: remove $running param from volume_snapshot Alexandre Derumier via pve-devel
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=6rhlktrnudsrihrxasd7gtjeldrxmsrnhozspqr2ky4eqtkvie@jkwroyid5vpq \
--to=w.bumiller@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