Re: [PATCH proxmox-backup v3 07/30] pbs-config: implement encryption key config handling

Thomas Lamprecht
2026-04-19T21:07:51Z

Am 14.04.26 um 14:59 schrieb Christian Ebner:
> diff --git a/pbs-config/src/encryption_keys.rs b/pbs-config/src/encryption_keys.rs
>
> +/// Mark the key as archived by setting the `archived-at` timestamp.
> +pub fn archive_key(id: &str, mut config: SectionConfigData) -> Result<(), Error> {

nit: Unlike delete_key, which has a "Safety: caller must acquire and hold
config lock" doc comment, archive_key has no such note even though it has
the same precondition (takes `mut config` without re-locking). Might be good
to add an equivalent note here for consistency - this also nicely documents
the intent alongside the pending must_use-based fix for the missing lock
binding in store_key.

> +/// Config type for encryption key config entries
> +pub const ENCRYPTION_KEYS_CFG_TYPE_ID: &str = "sync-key";

nit: the type id "sync-key" hardcodes a sync-only assumption into what is
otherwise named as a generic "encryption keys" config. If there's any intent
to reuse this config outside of sync jobs later, albeit renaming it is a
minor migration cost, if some use cases really come up, just wanted to
notice this tiny boundary "leak" as now it'd be still trivial to adapt the
name, but really no hard feelings at all.