[pbs-devel] [PATCH proxmox v2 1/3] pbs-api-types: add schema for {worker, read, verify}-threads
Nicolas Frey
n.frey at proxmox.com
Thu Nov 6 17:13:10 CET 2025
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 <n.frey at proxmox.com>
---
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()
+}
+
+pub const WORKER_THREADS_SCHEMA: Schema = threads_schema(1);
+
+pub const READ_THREADS_SCHEMA: Schema = threads_schema(1);
+
+pub const VERIFY_THREADS_SCHEMA: Schema = threads_schema(4);
+
/// Base directory where datastores are mounted
pub const DATASTORE_MOUNT_DIR: &str = "/mnt/datastore";
--
2.47.3
More information about the pbs-devel
mailing list