all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage 1/6] config: drop 'maxfiles' parameter
Date: Fri, 18 Jul 2025 14:51:12 +0200	[thread overview]
Message-ID: <20250718125408.133376-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20250718125408.133376-1-f.ebner@proxmox.com>

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@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2025-07-18 12:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-18 12:51 [pve-devel] [PATCH-SERIES storage/guest-common/manager/docs 0/6] backup/storage: drop 'maxfiles' setting Fiona Ebner
2025-07-18 12:51 ` Fiona Ebner [this message]
2025-07-30 17:36   ` [pve-devel] applied: [PATCH storage 1/6] config: drop 'maxfiles' parameter Thomas Lamprecht
2025-07-18 12:51 ` [pve-devel] [PATCH guest-common 2/6] schema: backup: " Fiona Ebner
2025-07-18 12:51 ` [pve-devel] [PATCH manager 3/6] pve8to9: backup retention: increase severity of having 'maxfiles' setting configured Fiona Ebner
2025-07-29 15:54   ` [pve-devel] applied: " Thomas Lamprecht
2025-07-18 12:51 ` [pve-devel] [PATCH manager 4/6] backup: drop 'maxfiles' parameter Fiona Ebner
2025-07-30 23:21   ` [pve-devel] applied: " Thomas Lamprecht
2025-07-18 12:51 ` [pve-devel] [PATCH manager 5/6] ui: drop handling of removed 'maxfiles' setting Fiona Ebner
2025-07-30 23:21   ` [pve-devel] applied: " Thomas Lamprecht
2025-07-18 12:51 ` [pve-devel] [PATCH docs 6/6] backup/storage: remove references to 'maxfiles' parameter Fiona Ebner
2025-07-30 23:47   ` [pve-devel] applied: " Thomas Lamprecht

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=20250718125408.133376-2-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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal