[pbs-devel] applied: [PATCH proxmox-backup] fix #3336: datastore: remove group if the last snapshot is removed
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Apr 2 14:45:04 CEST 2025
Am 27.03.25 um 11:34 schrieb Shannon Sterz:
> empty groups are not visible in the gui. this led to a confusing issue
> where users were unable to create a group because it already existed
> and was still owned by another user. resolve this issue by removing
> the group if its last snapshot is removed.
>
> also fixes an issue where removing a group used the non-atomic
> `remove_dir_all()` function when destroying a group unconditionally.
> this could lead to two different threads suddenly holding a lock to
> the same group. make sure that the new locking mechanism is used,
> which prevents that, before removing the group. this is also a bit
> more conservative now, as it specifically removes the owner file and
> group directory separately to avoid accidentaly removing snapshots in
> case we made an oversight.
>
> Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
> ---
> pbs-datastore/src/backup_info.rs | 36 +++++++++++++++++++++++++++-----
> pbs-datastore/src/datastore.rs | 6 +++++-
> 2 files changed, 36 insertions(+), 6 deletions(-)
>
>
applied, with tiny touch-ups to the commit message, i.e. one typo
(s/accidentaly/accidentally/) and while already at it, I added
uppercasing on sentence start, thanks!
More information about the pbs-devel
mailing list