[pve-devel] [PATCH v3 qemu-server 5/7] Use MAX_UNUSED_DISKS from Drive.pm to avoid duplication

Fabian Ebner f.ebner at proxmox.com
Mon Mar 2 11:33:46 CET 2020


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/QemuConfig.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm
index 1ba728a..8d03774 100644
--- a/PVE/QemuConfig.pm
+++ b/PVE/QemuConfig.pm
@@ -5,6 +5,7 @@ use warnings;
 
 use PVE::AbstractConfig;
 use PVE::INotify;
+use PVE::QemuServer::Drive;
 use PVE::QemuServer::Helpers;
 use PVE::QemuServer::Monitor qw(mon_cmd);
 use PVE::QemuServer;
@@ -22,8 +23,6 @@ mkdir "/etc/pve/nodes/$nodename/qemu-server";
 my $lock_dir = "/var/lock/qemu-server";
 mkdir $lock_dir;
 
-my $MAX_UNUSED_DISKS = 256;
-
 sub assert_config_exists_on_node {
     my ($vmid, $node) = @_;
 
@@ -46,7 +45,7 @@ sub guest_type {
 sub __config_max_unused_disks {
     my ($class) = @_;
 
-    return $MAX_UNUSED_DISKS;
+    return $PVE::QemuServer::Drive::MAX_UNUSED_DISKS;
 }
 
 sub config_file_lock {
-- 
2.20.1





More information about the pve-devel mailing list