From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 43C441FF0AB for ; Wed, 23 Sep 2026 12:28:26 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 559532159C; Wed, 23 Sep 2026 12:28:23 +0200 (CEST) From: Thomas Ellmenreich To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 2/2] fix #4646: backup writer: base debug flag on log level Date: Wed, 23 Sep 2026 12:27:59 +0200 Message-ID: <20260923102759.139819-3-t.ellmenreich@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260923102759.139819-1-t.ellmenreich@proxmox.com> References: <20260923102759.139819-1-t.ellmenreich@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1790159298259 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.561 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 337XLVHIMBZ6363U43ZU2KEEKRNSRBIS X-Message-ID-Hash: 337XLVHIMBZ6363U43ZU2KEEKRNSRBIS X-MailFrom: t.ellmenreich@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Thomas Ellmenreich X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Before, the debug flag had to be set manually for each instance of BackupWriterOptions. However, with the 'new' constructor, the parameter has been removed and the flag is now derived from the verbosity of the current log level. Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=4646 Signed-off-by: Thomas Ellmenreich --- examples/upload-speed.rs | 1 - pbs-client/src/backup_writer.rs | 3 +-- proxmox-backup-client/src/benchmark.rs | 1 - proxmox-backup-client/src/main.rs | 1 - src/server/push.rs | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/upload-speed.rs b/examples/upload-speed.rs index a0b742854..851eee1e6 100644 --- a/examples/upload-speed.rs +++ b/examples/upload-speed.rs @@ -24,7 +24,6 @@ async fn upload_speed() -> Result { &BackupNamespace::root(), &(BackupType::Host, "speedtest".to_string(), backup_time).into(), None, - false, true, false, ), diff --git a/pbs-client/src/backup_writer.rs b/pbs-client/src/backup_writer.rs index 7c3cb21b7..7ae12295d 100644 --- a/pbs-client/src/backup_writer.rs +++ b/pbs-client/src/backup_writer.rs @@ -106,7 +106,6 @@ impl<'a> BackupWriterOptions<'a> { ns: &'a BackupNamespace, backup: &'a BackupDir, crypt_config: Option>, - debug: bool, benchmark: bool, no_cache: bool, ) -> Self { @@ -115,7 +114,7 @@ impl<'a> BackupWriterOptions<'a> { ns, backup, crypt_config, - debug, + debug: proxmox_log::enabled!(Level::DEBUG), benchmark, no_cache, } diff --git a/proxmox-backup-client/src/benchmark.rs b/proxmox-backup-client/src/benchmark.rs index af9113ecb..924f825e8 100644 --- a/proxmox-backup-client/src/benchmark.rs +++ b/proxmox-backup-client/src/benchmark.rs @@ -243,7 +243,6 @@ async fn test_upload_speed( &BackupNamespace::root(), &(BackupType::Host, "benchmark".to_string(), backup_time).into(), crypt_config.clone(), - false, true, no_cache, ), diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/main.rs index 3aaaac39e..0067d87eb 100644 --- a/proxmox-backup-client/src/main.rs +++ b/proxmox-backup-client/src/main.rs @@ -1051,7 +1051,6 @@ async fn create_backup( &backup_ns, &snapshot, crypt_config.clone(), - true, false, no_cache, ), diff --git a/src/server/push.rs b/src/server/push.rs index 665c77a8d..5067d8033 100644 --- a/src/server/push.rs +++ b/src/server/push.rs @@ -1141,7 +1141,6 @@ pub(crate) async fn push_snapshot( .map(|(_id, conf)| Arc::clone(conf)), false, false, - false, ), ) .await -- 2.47.3