[pbs-devel] [PATCH proxmox-backup 2/4] verify: use tuning options' thread settings for {verify, read}-threads

Nicolas Frey n.frey at proxmox.com
Fri Nov 21 13:32:07 CET 2025


uses the datastores' verify job thread settings as a secondary
fallback:

read_threads   -> arg? -> datastore.read? -> 1 (default)
verify_threads -> arg? -> datastore.verify? -> 4 (default)

Signed-off-by: Nicolas Frey <n.frey at proxmox.com>
---
 src/backup/verify.rs | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/backup/verify.rs b/src/backup/verify.rs
index 734c7b30..f52d7781 100644
--- a/src/backup/verify.rs
+++ b/src/backup/verify.rs
@@ -73,6 +73,16 @@ impl VerifyWorker {
         verify_threads: Option<usize>,
     ) -> Result<Self, Error> {
         let backend = datastore.backend()?;
+        let thread_settings = datastore.thread_settings();
+
+        let read_threads = read_threads
+            .or(thread_settings.verify_job_read_threads)
+            .unwrap_or(1);
+
+        let verify_threads = verify_threads
+            .or(thread_settings.verify_job_verify_threads)
+            .unwrap_or(4);
+
         Ok(Self {
             worker,
             datastore,
@@ -81,8 +91,8 @@ impl VerifyWorker {
             // start with 64 chunks since we assume there are few corrupt ones
             corrupt_chunks: Arc::new(Mutex::new(HashSet::with_capacity(64))),
             backend,
-            read_threads: read_threads.unwrap_or(1),
-            verify_threads: verify_threads.unwrap_or(4),
+            read_threads,
+            verify_threads,
         })
     }
 
-- 
2.47.3




More information about the pbs-devel mailing list