From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 01BCD1FF187 for ; Mon, 3 Nov 2025 12:31:10 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D7DBC1A6F4; Mon, 3 Nov 2025 12:31:44 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Mon, 3 Nov 2025 12:31:10 +0100 Message-ID: <20251103113120.239455-8-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251103113120.239455-1-c.ebner@proxmox.com> References: <20251103113120.239455-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1762169484065 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.047 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 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 07/17] verify: rename corrupted to corrupt in log output and function names 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" Throughout the codebase the use of corrupt chunk is more frequent, so stick to that for the log outputs and function names as well. Signed-off-by: Christian Ebner --- src/backup/verify.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backup/verify.rs b/src/backup/verify.rs index e33fdf50f..df77d177b 100644 --- a/src/backup/verify.rs +++ b/src/backup/verify.rs @@ -76,7 +76,7 @@ impl VerifyWorker { } } - fn rename_corrupted_chunk(datastore: Arc, digest: &[u8; 32]) { + fn rename_corrupt_chunk(datastore: Arc, digest: &[u8; 32]) { let (path, digest_str) = datastore.chunk_path(digest); let mut counter = 0; @@ -106,14 +106,14 @@ impl VerifyWorker { match pbs_datastore::s3::object_key_from_digest_with_suffix(digest, &suffix) { Ok(target_key) => target_key, Err(err) => { - info!("could not generate target key for corrupted chunk {path:?} - {err}"); + info!("could not generate target key for corrupt chunk {path:?} - {err}"); return; } }; let object_key = match pbs_datastore::s3::object_key_from_digest(digest) { Ok(object_key) => object_key, Err(err) => { - info!("could not generate object key for corrupted chunk {path:?} - {err}"); + info!("could not generate object key for corrupt chunk {path:?} - {err}"); return; } }; @@ -136,12 +136,12 @@ impl VerifyWorker { match std::fs::rename(&path, &new_path) { Ok(_) => { - info!("corrupted chunk renamed to {:?}", &new_path); + info!("corrupt chunk renamed to {:?}", &new_path); } Err(err) => { match err.kind() { std::io::ErrorKind::NotFound => { /* ignored */ } - _ => info!("could not rename corrupted chunk {:?} - {err}", &path), + _ => info!("could not rename corrupt chunk {:?} - {err}", &path), } } }; @@ -189,7 +189,7 @@ impl VerifyWorker { corrupt_chunks2.lock().unwrap().insert(digest); info!("{err}"); errors2.fetch_add(1, Ordering::SeqCst); - Self::rename_corrupted_chunk(datastore2.clone(), &digest); + Self::rename_corrupt_chunk(datastore2.clone(), &digest); } else { verified_chunks2.lock().unwrap().insert(digest); } @@ -336,7 +336,7 @@ impl VerifyWorker { corrupt_chunks.insert(digest); error!(message); errors.fetch_add(1, Ordering::SeqCst); - Self::rename_corrupted_chunk(self.datastore.clone(), &digest); + Self::rename_corrupt_chunk(self.datastore.clone(), &digest); } fn verify_fixed_index(&self, backup_dir: &BackupDir, info: &FileInfo) -> Result<(), Error> { -- 2.47.3 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel