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

Christian Ebner
2026-04-15T08:21:55Z

On 4/15/26 10:02 AM, Daniel Kral wrote:
> On Wed Apr 15, 2026 at 8:48 AM CEST, Christian Ebner wrote:
>> On 4/14/26 4:31 PM, Michael Köppl wrote:
>>> 2 comments inline
>>>
>>> On Tue Apr 14, 2026 at 2:59 PM CEST, Christian Ebner wrote:
>>>> + // lock to avoid race with key deletion
>>>> + open_backup_lockfile(&key_lock_path, None, true)?;
>>>
>>> This needs to be assigned to a variable, no? Otherwise, the lock would
>>> be immediately dropped.
>>
>> Oh, good catch! Indeed without this the lock would be immediately
>> dropped, will be fixed. Thanks!
>>
>
> Would it make sense to add a #[must_use = "..."] attribute [0] to
> open_backup_lockfile() or even the BackupLockGuard in general or would
> it be too strict here?

Yes, adding it directly to `BackupLockGuard` makes the most sense here.
And with that, only above currently unused location is reported.

Will send a dedicated patch for this shortly, thanks!