all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-offline-mirror v2 2/5] pool: drop superfluous check for impossible path combination
Date: Tue,  9 Jul 2024 12:47:02 +0200	[thread overview]
Message-ID: <20240709104705.1681395-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20240709104705.1681395-1-s.ivanov@proxmox.com>

commit c598cb154ef3fa6e1a8af840ded40f713d973d3d changed the pool
layout to have the pool directory (.pool for a mirror) on the same
level as the link directory (instead of below), to enable pool-sharing
across multiple mirrors.

the condition will never be true, drop the if statement to avoid
confusion in the future.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 src/pool.rs | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/pool.rs b/src/pool.rs
index f20f5ea..611dcc9 100644
--- a/src/pool.rs
+++ b/src/pool.rs
@@ -265,9 +265,6 @@ impl PoolLockGuard<'_> {
 
         for link_entry in WalkDir::new(&self.pool.link_dir).into_iter() {
             let path = link_entry?.into_path();
-            if self.path_in_pool(&path) {
-                continue;
-            };
 
             let meta = path.metadata()?;
             if !meta.is_file() {
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2024-07-09 10:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 10:47 [pve-devel] [PATCH proxmox-offline-mirror v2 0/5] remove snapshot directories vanished on source also on medium Stoiko Ivanov
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 1/5] bump proxmox-apt to 0.11 and adapt to changes Stoiko Ivanov
2024-07-09 10:47 ` Stoiko Ivanov [this message]
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 3/5] pool: unlink_file: fix check for empty directory Stoiko Ivanov
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 4/5] pool: gc: remove empty directories under link_dir Stoiko Ivanov
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 5/5] pool: remove unused imports Stoiko Ivanov
2024-07-10 10:42 ` [pve-devel] applied-series: [PATCH proxmox-offline-mirror v2 0/5] remove snapshot directories vanished on source also on medium Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240709104705.1681395-3-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal