From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id A558F1FF17E for ; Thu, 11 Dec 2025 16:38:43 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 50A341A4F6; Thu, 11 Dec 2025 16:39:25 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Thu, 11 Dec 2025 16:38:29 +0100 Message-ID: <20251211153835.180405-3-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251211153835.180405-1-c.ebner@proxmox.com> References: <20251211153835.180405-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1765467529316 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.046 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup v2 2/8] chunk store: rename and limit scope for chunk store iterator X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Since the introduction of marker files for datastores backed by s3 object stores, the iterator can also include the .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 --- 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 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel