From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id D87241FF17A for ; Fri, 18 Jul 2025 14:53:22 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3893D1E6D8; Fri, 18 Jul 2025 14:54:18 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Fri, 18 Jul 2025 14:51:12 +0200 Message-ID: <20250718125408.133376-2-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250718125408.133376-1-f.ebner@proxmox.com> References: <20250718125408.133376-1-f.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1752843249167 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.027 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH storage 1/6] config: drop 'maxfiles' parameter X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" The 'maxfiles' parameter has been deprecated since the addition of 'prune-backups' in the Proxmox VE 7 beta. The setting was auto-converted when reading the storage configuration. Signed-off-by: Fiona Ebner --- src/PVE/Storage.pm | 23 ----------------------- src/PVE/Storage/BTRFSPlugin.pm | 1 - src/PVE/Storage/CIFSPlugin.pm | 1 - src/PVE/Storage/CephFSPlugin.pm | 1 - src/PVE/Storage/DirPlugin.pm | 1 - src/PVE/Storage/NFSPlugin.pm | 1 - src/PVE/Storage/PBSPlugin.pm | 1 - src/PVE/Storage/Plugin.pm | 7 ------- src/test/list_volumes_test.pm | 1 - src/test/path_to_volume_id_test.pm | 1 - 10 files changed, 38 deletions(-) diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm index 6ca9f88..947e604 100755 --- a/src/PVE/Storage.pm +++ b/src/PVE/Storage.pm @@ -249,27 +249,6 @@ sub lock_storage_config { } } -# FIXME remove maxfiles for PVE 8.0 or PVE 9.0 -my $convert_maxfiles_to_prune_backups = sub { - my ($scfg) = @_; - - return if !$scfg; - - my $maxfiles = delete $scfg->{maxfiles}; - - if (!defined($scfg->{'prune-backups'}) && defined($maxfiles)) { - my $prune_backups; - if ($maxfiles) { - $prune_backups = { 'keep-last' => $maxfiles }; - } else { # maxfiles 0 means no limit - $prune_backups = { 'keep-all' => 1 }; - } - $scfg->{'prune-backups'} = PVE::JSONSchema::print_property_string( - $prune_backups, 'prune-backups', - ); - } -}; - sub storage_config { my ($cfg, $storeid, $noerr) = @_; @@ -279,8 +258,6 @@ sub storage_config { die "storage '$storeid' does not exist\n" if (!$noerr && !$scfg); - $convert_maxfiles_to_prune_backups->($scfg); - return $scfg; } diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm index 26eef2b..7d6ed62 100644 --- a/src/PVE/Storage/BTRFSPlugin.pm +++ b/src/PVE/Storage/BTRFSPlugin.pm @@ -68,7 +68,6 @@ sub options { nodes => { optional => 1 }, shared => { optional => 1 }, disable => { optional => 1 }, - maxfiles => { optional => 1 }, 'prune-backups' => { optional => 1 }, 'max-protected-backups' => { optional => 1 }, content => { optional => 1 }, diff --git a/src/PVE/Storage/CIFSPlugin.pm b/src/PVE/Storage/CIFSPlugin.pm index 75d89c1..35a1a3b 100644 --- a/src/PVE/Storage/CIFSPlugin.pm +++ b/src/PVE/Storage/CIFSPlugin.pm @@ -153,7 +153,6 @@ sub options { subdir => { optional => 1 }, nodes => { optional => 1 }, disable => { optional => 1 }, - maxfiles => { optional => 1 }, 'prune-backups' => { optional => 1 }, 'max-protected-backups' => { optional => 1 }, content => { optional => 1 }, diff --git a/src/PVE/Storage/CephFSPlugin.pm b/src/PVE/Storage/CephFSPlugin.pm index 67c79aa..fbc9711 100644 --- a/src/PVE/Storage/CephFSPlugin.pm +++ b/src/PVE/Storage/CephFSPlugin.pm @@ -153,7 +153,6 @@ sub options { 'create-subdirs' => { optional => 1 }, fuse => { optional => 1 }, bwlimit => { optional => 1 }, - maxfiles => { optional => 1 }, keyring => { optional => 1 }, 'prune-backups' => { optional => 1 }, 'max-protected-backups' => { optional => 1 }, diff --git a/src/PVE/Storage/DirPlugin.pm b/src/PVE/Storage/DirPlugin.pm index 9d15f33..80c4a03 100644 --- a/src/PVE/Storage/DirPlugin.pm +++ b/src/PVE/Storage/DirPlugin.pm @@ -84,7 +84,6 @@ sub options { nodes => { optional => 1 }, shared => { optional => 1 }, disable => { optional => 1 }, - maxfiles => { optional => 1 }, 'prune-backups' => { optional => 1 }, 'max-protected-backups' => { optional => 1 }, content => { optional => 1 }, diff --git a/src/PVE/Storage/NFSPlugin.pm b/src/PVE/Storage/NFSPlugin.pm index a8339ef..b416703 100644 --- a/src/PVE/Storage/NFSPlugin.pm +++ b/src/PVE/Storage/NFSPlugin.pm @@ -93,7 +93,6 @@ sub options { export => { fixed => 1 }, nodes => { optional => 1 }, disable => { optional => 1 }, - maxfiles => { optional => 1 }, 'prune-backups' => { optional => 1 }, 'max-protected-backups' => { optional => 1 }, options => { optional => 1 }, diff --git a/src/PVE/Storage/PBSPlugin.pm b/src/PVE/Storage/PBSPlugin.pm index 00170f5..22e7a8b 100644 --- a/src/PVE/Storage/PBSPlugin.pm +++ b/src/PVE/Storage/PBSPlugin.pm @@ -72,7 +72,6 @@ sub options { password => { optional => 1 }, 'encryption-key' => { optional => 1 }, 'master-pubkey' => { optional => 1 }, - maxfiles => { optional => 1 }, 'prune-backups' => { optional => 1 }, 'max-protected-backups' => { optional => 1 }, fingerprint => { optional => 1 }, diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm index ef04cb1..1b272cf 100644 --- a/src/PVE/Storage/Plugin.pm +++ b/src/PVE/Storage/Plugin.pm @@ -159,13 +159,6 @@ my $defaultData = { type => 'boolean', optional => 1, }, - maxfiles => { - description => "Deprecated: use 'prune-backups' instead. " - . "Maximal number of backup files per VM. Use '0' for unlimited.", - type => 'integer', - minimum => 0, - optional => 1, - }, 'prune-backups' => get_standard_option('prune-backups'), 'max-protected-backups' => { description => diff --git a/src/test/list_volumes_test.pm b/src/test/list_volumes_test.pm index e528fc3..0876902 100644 --- a/src/test/list_volumes_test.pm +++ b/src/test/list_volumes_test.pm @@ -63,7 +63,6 @@ my $mocked_vmlist = { my $storage_dir = File::Temp->newdir(); my $scfg = { 'type' => 'dir', - 'maxfiles' => 0, 'path' => $storage_dir, 'shared' => 0, 'content' => { diff --git a/src/test/path_to_volume_id_test.pm b/src/test/path_to_volume_id_test.pm index 9a5ecbb..e69b085 100644 --- a/src/test/path_to_volume_id_test.pm +++ b/src/test/path_to_volume_id_test.pm @@ -22,7 +22,6 @@ my $scfg = { 'shared' => 0, 'path' => "$storage_dir", 'type' => 'dir', - 'maxfiles' => 0, 'content' => { 'snippets' => 1, 'rootdir' => 1, -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel