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 C25A61FF2C6 for ; Tue, 9 Jul 2024 12:47:11 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0BDD81D7B4; Tue, 9 Jul 2024 12:47:27 +0200 (CEST) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Date: Tue, 9 Jul 2024 12:47:00 +0200 Message-Id: <20240709104705.1681395-1-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.075 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com, mirror.rs, lib.rs, pool.rs] Subject: [pve-devel] [PATCH proxmox-offline-mirror v2 0/5] remove snapshot directories vanished on source also on medium X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" supersedes: https://lists.proxmox.com/pipermail/pve-devel/2024-June/064278.html v1->v2: * had quite a few chats with Fabian off-list, as noted by him - Thanks! * noticed that the core-issue was probably an error in using path.is_empty (which checks for an empty path '', not for an empty directory) fixed with patch 3/5 * noticed that the current gc-code removes orphaned files (a.k.a. files not hardlinked to a checksum file) in any case - so dropped the idea of an explicit command-line switch (as sync_pool calls gc on the target pool as well) - can gladly rework both to add this as explicit safe-guard, but currently do not think it has much merit * patch 1/5 addresses the recent changes to proxmox-apt - I hope it's ok as is. * patch 2/5 is unrelated, but it confused me enough while going through the code. tested with a local setup. original cover-letter for v1: This patchset fixes a small glitch that we noticed in a pom-setup, creating regular snapshots, without cleaning them up regularly. Eventually medium sync becomes quite slow. After removing many snapshots and running garbage collection both on the mirror as well as on the medium the run-time for the sync still took quite long. strace showed that the process still walked through the directories for each snapshot on the medium - they were not cleaned up after all the files inside were removed. tested the patch locally (which is the reason for patch 1/2). Stoiko Ivanov (5): bump proxmox-apt to 0.11 and adapt to changes. pool: drop superfluous check for impossible path combination pool: unlink_file: fix check for empty directory pool: gc: remove empty directories under link_dir pool: remove unused imports Cargo.toml | 3 ++- debian/control | 3 ++- src/lib.rs | 5 +++-- src/mirror.rs | 11 +++++------ src/pool.rs | 24 ++++++++++++++---------- 5 files changed, 26 insertions(+), 20 deletions(-) -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel