From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 0AFD11FF168 for ; Tue, 18 Feb 2025 13:35:59 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 30F68B7D6; Tue, 18 Feb 2025 13:35:54 +0100 (CET) Message-ID: Date: Tue, 18 Feb 2025 13:35:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion , Markus Frank References: <20250122100901.74830-1-m.frank@proxmox.com> <20250122100901.74830-3-m.frank@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20250122100901.74830-3-m.frank@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.045 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: Re: [pve-devel] [PATCH guest-common v13 2/12] add dir mapping section config 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" Am 22.01.25 um 11:08 schrieb Markus Frank: > Adds a config file for directories by using a 'map' property string for > each node mapping. > > Next to node & path, there is the optional announce-submounts parameter > which forces virtiofsd to report a different device number for each > submount it encounters. Without it, duplicates may be created because > inode IDs are only unique on a single filesystem. > > example config: > ``` > some-dir-id > map node=node1,path=/mnt/share/,announce-submounts=1 > map node=node2,path=/mnt/share/, > ``` > > Signed-off-by: Markus Frank Just a few small comments, if there will be a v14, those should be addressed. Otherwise: Reviewed-by: Fiona Ebner > +my $map_fmt = { > + node => get_standard_option('pve-node'), > + path => { > + description => "Absolute directory path that should be shared with the guest.", > + type => 'string', > + format => 'pve-storage-path', > + }, > + 'announce-submounts' => { > + type => 'boolean', > + description => "Announce that the directory contains other mounted file systems." > + ." If this is not set and multiple file systems are mounted, the guest may" > + ." encounter duplicates due to file system specific inode IDs.", Style nit: wrong indentation for the two lines above > + optional => 1, > + default => 1, > + }, > + description => { > + description => "Description of the node specific directory.", > + type => 'string', > + optional => 1, > + maxLength => 4096, > + }, > +}; > + > +my $defaultData = { > + propertyList => { > + id => { > + type => 'string', > + description => "The ID of the directory", Nit: I'd clarify slightly more with "of the directory mapping" > + format => 'pve-configid', > + }, > + description => { > + type => 'string', > + description => "Description of the directory", Nit: I'd clarify slightly more with "of the directory mapping" > + optional => 1, > + maxLength => 4096, > + }, > + map => { > + type => 'array', > + description => 'A list of maps for the cluster nodes.', > + optional => 1, > + items => { > + type => 'string', > + format => $map_fmt, > + }, > + }, > + }, > +}; > + > +sub private { > + return $defaultData; > +} > + > +sub map_fmt { > + return $map_fmt; > +} The map_fmt() subroutine is never called from anywhere or am I missing something? > +sub write_dir_config { > + my ($cfg) = @_; > + > + cfs_write_file($FILENAME, $cfg); Rather orthogonal to the series, but since this is a new configuration file, should we start out with it always being UTF-8? I sent an RFC for allowing to register such configuration files: https://lore.proxmox.com/pve-devel/20250218123006.61691-1-f.ebner@proxmox.com/T/#t If some proposal for registering UTF-8 configs is accepted before this series lands, it would be nice to opt into it. But it's not a blocker and could still be done when applying if everything else is ready. > +} > + > +sub find_on_current_node { > + my ($id) = @_; > + > + my $cfg = config(); > + my $node = PVE::INotify::nodename(); > + > + return get_node_mapping($cfg, $id, $node); > +} _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel