[pbs-devel] [PATCH proxmox-backup 2/3] GC: rename helper to cond_sweep_chunk
Christian Ebner
c.ebner at proxmox.com
Wed Oct 15 11:12:27 CEST 2025
On 10/15/25 10:38 AM, Fabian Grünbichler wrote:
> and make it take self, to make it more clear that the chunk store should be
> locked at this point.
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
> pbs-datastore/src/chunk_store.rs | 5 +++--
> pbs-datastore/src/datastore.rs | 2 +-
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/pbs-datastore/src/chunk_store.rs b/pbs-datastore/src/chunk_store.rs
> index 1c7df9074..f81603971 100644
> --- a/pbs-datastore/src/chunk_store.rs
> +++ b/pbs-datastore/src/chunk_store.rs
> @@ -408,7 +408,7 @@ impl ChunkStore {
>
> chunk_count += 1;
>
> - Self::check_atime_and_update_gc_status(
> + self.cond_sweep_chunk(
> stat.st_atime,
> min_atime,
> oldest_writer,
> @@ -435,7 +435,8 @@ impl ChunkStore {
> /// status accordingly.
> ///
> /// If the chunk should be removed, the [`remove_callback`] is executed.
> - pub(super) fn check_atime_and_update_gc_status<T: FnOnce() -> Result<(), Error>>(
> + pub(super) fn cond_sweep_chunk<T: FnOnce() -> Result<(), Error>>(
> + &self,
> atime: i64,
> min_atime: i64,
> oldest_writer: i64,
> diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
> index 21998a157..f1237af32 100644
> --- a/pbs-datastore/src/datastore.rs
> +++ b/pbs-datastore/src/datastore.rs
> @@ -1664,7 +1664,7 @@ impl DataStore {
> .extension()
> .is_some_and(|ext| ext == "bad");
>
> - ChunkStore::check_atime_and_update_gc_status(
> + self.inner.chunk_store.cond_sweep_chunk(
> atime,
> min_atime,
> oldest_writer,
LGTM!
Reviewed-by: Christian Ebner <c.ebner at proxmox.com>
More information about the pbs-devel
mailing list