From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: applied: [PATCH qemu-server] config: use drive_is_cdrom() helper from drive module directly
Date: Thu, 19 Feb 2026 11:47:55 +0100 [thread overview]
Message-ID: <20260219104839.47891-1-f.ebner@proxmox.com> (raw)
Do not use the drive_is_cdrom() helper that the QemuServer module
imports. Get rid of this pseudo-dependency from the QemuConfig module
to the QemuServer module.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/QemuConfig.pm | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index 844ed69a..67dec91b 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -80,7 +80,7 @@ sub has_feature {
sub {
my ($ds, $drive) = @_;
- return if PVE::QemuServer::drive_is_cdrom($drive);
+ return if PVE::QemuServer::Drive::drive_is_cdrom($drive);
return if $backup_only && defined($drive->{backup}) && !$drive->{backup};
my $volid = $drive->{file};
$err = 1
@@ -186,7 +186,7 @@ sub get_backup_volumes {
my $test_volume = sub {
my ($key, $drive) = @_;
- return if PVE::QemuServer::drive_is_cdrom($drive);
+ return if PVE::QemuServer::Drive::drive_is_cdrom($drive);
my $included = $drive->{backup} // 1;
my $reason = "backup=";
@@ -274,7 +274,7 @@ sub __snapshot_activate_storages {
sub {
my ($key, $drive) = @_;
- return if PVE::QemuServer::drive_is_cdrom($drive);
+ return if PVE::QemuServer::Drive::drive_is_cdrom($drive);
my ($storeid) = PVE::Storage::parse_volume_id($drive->{file});
$storage_hash->{$storeid} = 1;
@@ -392,7 +392,7 @@ sub __snapshot_create_vol_snapshots_hook {
sub __snapshot_create_vol_snapshot {
my ($class, $vmid, $ds, $drive, $snapname) = @_;
- return if PVE::QemuServer::drive_is_cdrom($drive);
+ return if PVE::QemuServer::Drive::drive_is_cdrom($drive);
my $volid = $drive->{file};
my $device = "drive-$ds";
@@ -410,7 +410,7 @@ sub __snapshot_delete_remove_drive {
delete $snap->{$remove_drive};
} else {
my $drive = PVE::QemuServer::parse_drive($remove_drive, $snap->{$remove_drive});
- return if PVE::QemuServer::drive_is_cdrom($drive);
+ return if PVE::QemuServer::Drive::drive_is_cdrom($drive);
my $volid = $drive->{file};
delete $snap->{$remove_drive};
@@ -433,7 +433,7 @@ sub __snapshot_delete_vmstate_file {
sub __snapshot_delete_vol_snapshot {
my ($class, $vmid, $ds, $drive, $snapname, $unused) = @_;
- return if PVE::QemuServer::drive_is_cdrom($drive);
+ return if PVE::QemuServer::Drive::drive_is_cdrom($drive);
my $storecfg = PVE::Storage::config();
my $volid = $drive->{file};
@@ -486,7 +486,7 @@ sub __snapshot_rollback_hook {
sub __snapshot_rollback_vol_possible {
my ($class, $drive, $snapname, $blockers) = @_;
- return if PVE::QemuServer::drive_is_cdrom($drive);
+ return if PVE::QemuServer::Drive::drive_is_cdrom($drive);
my $storecfg = PVE::Storage::config();
my $volid = $drive->{file};
@@ -497,7 +497,7 @@ sub __snapshot_rollback_vol_possible {
sub __snapshot_rollback_vol_rollback {
my ($class, $drive, $snapname) = @_;
- return if PVE::QemuServer::drive_is_cdrom($drive);
+ return if PVE::QemuServer::Drive::drive_is_cdrom($drive);
my $storecfg = PVE::Storage::config();
PVE::Storage::volume_snapshot_rollback($storecfg, $drive->{file}, $snapname);
@@ -533,7 +533,7 @@ sub __snapshot_rollback_get_unused {
sub {
my ($vs, $volume) = @_;
- return if PVE::QemuServer::drive_is_cdrom($volume, 1);
+ return if PVE::QemuServer::Drive::drive_is_cdrom($volume, 1);
my $found = 0;
my $volid = $volume->{file};
@@ -544,7 +544,7 @@ sub __snapshot_rollback_get_unused {
my ($ds, $drive) = @_;
return if $found;
- return if PVE::QemuServer::drive_is_cdrom($drive, 1);
+ return if PVE::QemuServer::Drive::drive_is_cdrom($drive, 1);
$found = 1
if ($drive->{file} && $drive->{file} eq $volid);
--
2.47.3
reply other threads:[~2026-02-19 10:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260219104839.47891-1-f.ebner@proxmox.com \
--to=f.ebner@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 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.