[pve-devel] [PATCH storage 1/6] config: drop 'maxfiles' parameter
Fiona Ebner
f.ebner at proxmox.com
Fri Jul 18 14:51:12 CEST 2025
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 <f.ebner at proxmox.com>
---
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
More information about the pve-devel
mailing list