[PATCH pve-manager v1 54/54] fix #2884: ui: storage: add field for 'max-scan-depth' property

Max R. Carrara
2026-04-22T11:21:01Z

In the base storage panel, add a simple integer field in the advanced
section for storage types that use the new `max-scan-depth` property.

This means that the maximum directory scan depth can now be configured
for directories, NFS, CIFS, CephFS, and BTRFS.

Originally-by: Noel Ullreich <n.ullreich@proxmox.com>
Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
---
www/manager6/storage/Base.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/www/manager6/storage/Base.js b/www/manager6/storage/Base.js
index 8961460b..0cf90337 100644
--- a/www/manager6/storage/Base.js
+++ b/www/manager6/storage/Base.js
@@ -75,6 +75,20 @@ Ext.define('PVE.panel.StorageBase', {
});
}

+ const subdirScanningStorageTypes = ['dir', 'nfs', 'cifs', 'cephfs', 'btrfs'];
+
+ if (subdirScanningStorageTypes.includes(me.type)) {
+ addAdvancedWidget({
+ xtype: 'proxmoxintegerfield',
+ name: 'max-scan-depth',
+ fieldLabel: gettext('Maximum Directory Scan Depth'),
+ allowBlank: false,
+ value: 0,
+ minValue: 0,
+ maxValue: 50,
+ });
+ }
+
const externalStorageManagedSnapshotSupport = ['dir', 'nfs', 'cifs', 'lvm'];

if (externalStorageManagedSnapshotSupport.includes(me.type)) {
--
2.47.3