From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id A13E01FF17A for ; Tue, 11 Nov 2025 11:21:48 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E7B084738; Tue, 11 Nov 2025 11:22:34 +0100 (CET) Message-ID: <52b68f6d-af76-43f3-8ca1-a1297fd46d0d@proxmox.com> Date: Tue, 11 Nov 2025 11:22:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Christian Ebner To: Proxmox Backup Server development discussion , Nicolas Frey References: <20251110084417.173290-1-n.frey@proxmox.com> <20251110084417.173290-2-n.frey@proxmox.com> Content-Language: en-US, de-DE In-Reply-To: <20251110084417.173290-2-n.frey@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1762856497858 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.048 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 Subject: Re: [pbs-devel] [PATCH proxmox v3 1/3] pbs-api-types: add schema for {worker, read, verify}-threads X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" comments inline On 11/10/25 9:44 AM, Nicolas Frey wrote: > Add seperate schemas for read and verify thread count to use in > chunk verification. Also add worker-threads for use in > `TapeBackupJobSetup`. > > Signed-off-by: Nicolas Frey > --- > pbs-api-types/src/datastore.rs | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs > index a214ac25..3dd9ce75 100644 > --- a/pbs-api-types/src/datastore.rs > +++ b/pbs-api-types/src/datastore.rs > @@ -164,6 +164,20 @@ pub const PRUNE_SCHEMA_KEEP_YEARLY: Schema = > .minimum(1) > .schema(); > > +const fn threads_schema(default: i64) -> Schema { > + IntegerSchema::new("The number of threads to use for the job.") > + .minimum(1) > + .maximum(32) > + .default(default) > + .schema() Failed to mention this in v2 of the patches, but these are all schemas related to the job config, not the datastore so they should be defined in pbs-api-types/src/jobs.rs instead. Further, in order to have a less generic description for resulting schemas, thread_schema() might get a `description: &'static str` as second parameter, so this can be set accordingly. > +pub const WORKER_THREADS_SCHEMA: Schema = threads_schema(1); This is named a bit generic, might be more telling if prefix by `TAPE_JOB_`. > + > +pub const READ_THREADS_SCHEMA: Schema = threads_schema(1); Same for above, but maybe `VERIFICIATION_` or `VERIFY_JOB_` as prefix ... > + > +pub const VERIFY_THREADS_SCHEMA: Schema = threads_schema(4); ... and above as well. > + > /// Base directory where datastores are mounted > pub const DATASTORE_MOUNT_DIR: &str = "/mnt/datastore"; > _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel