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 74A241FF13C for ; Thu, 30 Apr 2026 17:07:18 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 56FD5E9A8; Thu, 30 Apr 2026 17:07:18 +0200 (CEST) From: Robert Obkircher To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 07/10] chunk_store: check file system space before inserting new chunks Date: Thu, 30 Apr 2026 17:05:48 +0200 Message-ID: <20260430150607.330413-11-r.obkircher@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260430150607.330413-1-r.obkircher@proxmox.com> References: <20260430150607.330413-1-r.obkircher@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1777561505676 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.059 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 Message-ID-Hash: Z22LZGNJWV7JWXT3QWGJNHGVFS4OVF4Y X-Message-ID-Hash: Z22LZGNJWV7JWXT3QWGJNHGVFS4OVF4Y X-MailFrom: r.obkircher@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 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: This is done here to cover all possible paths (including tape restore) and to avoid the check for exiting chunks. Note that the atime update check invoked by gc and prune jobs tries to insert a zero chunk. However, that chunk is already inserted during datastore creation and never removed, so this should not prevent them from running on a full disk. Signed-off-by: Robert Obkircher --- pbs-datastore/src/chunk_store.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pbs-datastore/src/chunk_store.rs b/pbs-datastore/src/chunk_store.rs index a02f437c1..6a9dfbcef 100644 --- a/pbs-datastore/src/chunk_store.rs +++ b/pbs-datastore/src/chunk_store.rs @@ -736,6 +736,8 @@ impl ChunkStore { } } + self.check_space(encoded_size)?; + let chunk_dir_path = chunk_path .parent() .ok_or_else(|| format_err!("unable to get chunk dir"))?; -- 2.47.3