[pbs-devel] [PATCH proxmox-backup v2 0/3] rework GC-related locks

Christian Ebner c.ebner at proxmox.com
Thu Oct 2 11:22:42 CEST 2025


On 10/2/25 9:28 AM, Fabian Grünbichler wrote:
> this series reworks some of the locking behaviour surrounding GC.
> 
> the first patch removes a potentially problematic combination of
> std::sync::Mutex and async S3 code (this should be the last such code
> path), by storing the ProcessLocker guard inside the mutex while holding
> it just for storing/querying/dropping that guard, instead of for the
> duration of GC.
> 
> the second and third patches get rid of racy interactions between
> pre-reload backup sessions and post-reload GC tasks. while this race
> doesn't lead to data loss, it breaks the expected priority of such
> tasks.
> 
> v2: rework first patch to keep locking the Mutex first
> 
> Fabian Grünbichler (3):
>    GC: rework locking logic
>    backup env: keep a shared chunk store lock for duration of backup
>    index writers: remove chunk store lock
> 
>   pbs-datastore/src/datastore.rs     | 527 +++++++++++++++--------------
>   pbs-datastore/src/dynamic_index.rs |   6 +-
>   pbs-datastore/src/fixed_index.rs   |   6 +-
>   src/api2/backup/environment.rs     |   5 +
>   src/api2/backup/mod.rs             |   4 +-
>   5 files changed, 285 insertions(+), 263 deletions(-)
> 

Thanks a lot for your efforts on fixing these issues!

Looks good to me now, consider:

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




More information about the pbs-devel mailing list