From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 45EF4A183D for ; Thu, 15 Jun 2023 14:04:04 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 278B42669E for ; Thu, 15 Jun 2023 14:03:34 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 15 Jun 2023 14:03:33 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 198AC4585D for ; Thu, 15 Jun 2023 14:03:33 +0200 (CEST) From: Noel Ullreich To: pve-devel@lists.proxmox.com Date: Thu, 15 Jun 2023 14:03:27 +0200 Message-Id: <20230615120329.28764-3-n.ullreich@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230615120329.28764-1-n.ullreich@proxmox.com> References: <20230615120329.28764-1-n.ullreich@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.058 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 T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [nfsplugin.pm, cephfsplugin.pm, plugin.pm, cifsplugin.pm, glusterfsplugin.pm, dirplugin.pm] Subject: [pve-devel] [PATCH pve-storage v3 2/3] add `subdir-depth` option to filesystems 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: , X-List-Received-Date: Thu, 15 Jun 2023 12:04:04 -0000 Add the `subdir-depth` to the filesystems that can hold isos/vztmpl/snippets. Signed-off-by: Noel Ullreich --- src/PVE/Storage/CIFSPlugin.pm | 1 + src/PVE/Storage/CephFSPlugin.pm | 1 + src/PVE/Storage/DirPlugin.pm | 1 + src/PVE/Storage/GlusterfsPlugin.pm | 1 + src/PVE/Storage/NFSPlugin.pm | 1 + src/PVE/Storage/Plugin.pm | 7 +++++++ 6 files changed, 12 insertions(+) diff --git a/src/PVE/Storage/CIFSPlugin.pm b/src/PVE/Storage/CIFSPlugin.pm index 71b85aa..1ac8fcf 100644 --- a/src/PVE/Storage/CIFSPlugin.pm +++ b/src/PVE/Storage/CIFSPlugin.pm @@ -155,6 +155,7 @@ sub options { 'create-subdirs' => { optional => 1 }, bwlimit => { optional => 1 }, preallocation => { optional => 1 }, + 'subdir-depth' => { optional => 1}, options => { optional => 1 }, }; } diff --git a/src/PVE/Storage/CephFSPlugin.pm b/src/PVE/Storage/CephFSPlugin.pm index 8aad518..7f0f5b1 100644 --- a/src/PVE/Storage/CephFSPlugin.pm +++ b/src/PVE/Storage/CephFSPlugin.pm @@ -156,6 +156,7 @@ sub options { 'prune-backups' => { optional => 1 }, 'max-protected-backups' => { optional => 1 }, 'fs-name' => { optional => 1 }, + 'subdir-depth' => { optional => 1}, }; } diff --git a/src/PVE/Storage/DirPlugin.pm b/src/PVE/Storage/DirPlugin.pm index 2efa8d5..5f3739b 100644 --- a/src/PVE/Storage/DirPlugin.pm +++ b/src/PVE/Storage/DirPlugin.pm @@ -80,6 +80,7 @@ sub options { is_mountpoint => { optional => 1 }, bwlimit => { optional => 1 }, preallocation => { optional => 1 }, + 'subdir-depth' => { optional => 1}, }; } diff --git a/src/PVE/Storage/GlusterfsPlugin.pm b/src/PVE/Storage/GlusterfsPlugin.pm index 2b7f9e1..e151209 100644 --- a/src/PVE/Storage/GlusterfsPlugin.pm +++ b/src/PVE/Storage/GlusterfsPlugin.pm @@ -141,6 +141,7 @@ sub options { 'create-subdirs' => { optional => 1 }, bwlimit => { optional => 1 }, preallocation => { optional => 1 }, + 'subdir-depth' => { optional => 1}, }; } diff --git a/src/PVE/Storage/NFSPlugin.pm b/src/PVE/Storage/NFSPlugin.pm index f2e4c0d..dd88fe3 100644 --- a/src/PVE/Storage/NFSPlugin.pm +++ b/src/PVE/Storage/NFSPlugin.pm @@ -91,6 +91,7 @@ sub options { 'create-subdirs' => { optional => 1 }, bwlimit => { optional => 1 }, preallocation => { optional => 1 }, + 'subdir-depth' => { optional => 1}, }; } diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm index 87a08c3..f289af0 100644 --- a/src/PVE/Storage/Plugin.pm +++ b/src/PVE/Storage/Plugin.pm @@ -192,6 +192,13 @@ my $defaultData = { type => "string", format => "pve-dir-override-list", optional => 1, }, + 'subdir-depth' => { + description => "Maximal depth of subdirectories to look though when + searching for isos/container templates/snippets in a directory", + type => 'integer', + default => 0, + optional => 1, + }, options => { description => "NFS/CIFS mount options (see 'man nfs' or 'man mount.cifs')", type => 'string', -- 2.30.2