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 583231FF17C for ; Wed, 23 Jul 2025 13:49:45 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 94A72F879; Wed, 23 Jul 2025 13:51:04 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Wed, 23 Jul 2025 13:50:15 +0200 Message-ID: <20250723115015.711300-1-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753271451400 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.045 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] client: backup writer: make no-cache parameter backwards compatible 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" Commit 90723828 ("api: backup: add no-cache flag to bypass local datastore cache") introduced the additional flag to request bypassing of the datastore cache by the Proxmox Backup Server. The flag is however included in the backup api request parameters, which is incompatible with older version of the server. Fix this by only setting the flag if requested explicitley on invocation, as it is then not included for requests to older servers and for newer the default is to set this to false if not present anyways. Fixes: 90723828 ("api: backup: add no-cache flag to bypass local datastore cache") Reported-by: Maximiliano Sandoval Signed-off-by: Christian Ebner --- pbs-client/src/backup_writer.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pbs-client/src/backup_writer.rs b/pbs-client/src/backup_writer.rs index abe7c79e2..9f62baba3 100644 --- a/pbs-client/src/backup_writer.rs +++ b/pbs-client/src/backup_writer.rs @@ -102,8 +102,10 @@ impl BackupWriter { "store": writer_options.datastore, "debug": writer_options.debug, "benchmark": writer_options.benchmark, - "no-cache": writer_options.no_cache, }); + if writer_options.no_cache { + param["no-cache"] = serde_json::to_value(writer_options.no_cache)?; + } if !writer_options.ns.is_root() { param["ns"] = serde_json::to_value(writer_options.ns)?; -- 2.47.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel