[pbs-devel] [PATCH proxmox-backup 2/4] chunk store: rename and limit scope for chunk store iterator
Christian Ebner
c.ebner at proxmox.com
Wed Nov 26 14:34:17 CET 2025
Since the introduction of marker files for datastores backed by s3
object stores, the iterator can also include the <digest>.using file
entries and chunk marker files which have 0 size. Also, the returned
entries for regular datastores are not guaranteed be of type file, as
that is only checked by stating the entry afterwards, so there is no
guarantee to only get chunks by the iterator.
Therefore, rename the method to get_chunk_store_iterator(), which is
more generic and does not imply the returned entries are chunks.
While at it, also limit the scope for the method as this is not used
outside the module.
No functional changes intended.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
pbs-datastore/src/chunk_store.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pbs-datastore/src/chunk_store.rs b/pbs-datastore/src/chunk_store.rs
index 7fe09b914..a5e5f6261 100644
--- a/pbs-datastore/src/chunk_store.rs
+++ b/pbs-datastore/src/chunk_store.rs
@@ -276,7 +276,7 @@ impl ChunkStore {
Ok(true)
}
- pub fn get_chunk_iterator(
+ fn get_chunk_store_iterator(
&self,
) -> Result<
impl std::iter::FusedIterator<
@@ -397,7 +397,7 @@ impl ChunkStore {
let mut last_percentage = 0;
let mut chunk_count = 0;
- for (entry, percentage, bad) in self.get_chunk_iterator()? {
+ for (entry, percentage, bad) in self.get_chunk_store_iterator()? {
if last_percentage != percentage {
last_percentage = percentage;
info!("processed {percentage}% ({chunk_count} chunks)");
--
2.47.3
More information about the pbs-devel
mailing list