[pbs-devel] [PATCH proxmox-backup v3 5/6] api: verify: add {read, verify}-threads to update endpoint

Christian Ebner c.ebner at proxmox.com
Tue Nov 11 11:22:35 CET 2025


Reviewed-by: Christian Ebner <c.ebner at proxmox.com>

On 11/10/25 9:44 AM, Nicolas Frey wrote:
> Allows to add, update or delete the {read,verify}-thread property in
> the verify job config via the API.
> 
> Signed-off-by: Nicolas Frey <n.frey at proxmox.com>
> ---
>   src/api2/config/verify.rs | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
> 
> diff --git a/src/api2/config/verify.rs b/src/api2/config/verify.rs
> index e71e0c2e..a88a3c32 100644
> --- a/src/api2/config/verify.rs
> +++ b/src/api2/config/verify.rs
> @@ -149,6 +149,10 @@ pub enum DeletableProperty {
>       Ns,
>       /// Delete max-depth property, defaulting to full recursion again
>       MaxDepth,
> +    /// Delete read-threads property
> +    ReadThreads,
> +    /// Delete verify-threads property
> +    VerifyThreads,
>   }
>   
>   #[api(
> @@ -229,6 +233,12 @@ pub fn update_verification_job(
>                   DeletableProperty::MaxDepth => {
>                       data.max_depth = None;
>                   }
> +                DeletableProperty::ReadThreads => {
> +                    data.read_threads = None;
> +                }
> +                DeletableProperty::VerifyThreads => {
> +                    data.verify_threads = None;
> +                }
>               }
>           }
>       }
> @@ -266,6 +276,12 @@ pub fn update_verification_job(
>               data.max_depth = Some(max_depth);
>           }
>       }
> +    if update.read_threads.is_some() {
> +        data.read_threads = update.read_threads;
> +    }
> +    if update.verify_threads.is_some() {
> +        data.verify_threads = update.verify_threads;
> +    }
>   
>       // check new store and NS
>       user_info.check_privs(&auth_id, &data.acl_path(), PRIV_DATASTORE_VERIFY, true)?;





More information about the pbs-devel mailing list