From: Christian Ebner <c.ebner@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [RFC proxmox-backup 2/4] datastore: allow to specify sub-directory for index file listing
Date: Fri, 18 Apr 2025 11:55:03 +0200 [thread overview]
Message-ID: <e0f8d75b-3a10-4c15-8fff-0f5e0687ef22@proxmox.com> (raw)
In-Reply-To: <eed9fae8-c923-4e24-aefa-08d700c4070e@proxmox.com>
On 4/18/25 11:38, Thomas Lamprecht wrote:
> Am 16.04.25 um 16:18 schrieb Christian Ebner:
>> Extend the list_index_files helper to allow passing a sub-directory
>> to it. This will be used to fetch only index files from the `.trash`
>> directory, ignored by regular listing since hidden folders are not
>> considered.
>>
>> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
>> ---
>> pbs-datastore/src/datastore.rs | 13 ++++++++++---
>> 1 file changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
>> index 3fde8b871..97b78f000 100644
>> --- a/pbs-datastore/src/datastore.rs
>> +++ b/pbs-datastore/src/datastore.rs
>> @@ -972,8 +972,15 @@ impl DataStore {
>> /// The filesystem is walked recursevly to detect index files based on their archive type based
>> /// on the filename. This however excludes the chunks folder, hidden files and does not follow
>> /// symlinks.
>> - fn list_index_files(&self) -> Result<HashSet<PathBuf>, Error> {
>> - let base = self.base_path();
>> + /// If a subdirectory is provided, only that is scanned for index files.
>> + fn list_index_files(&self, subdir: Option<PathBuf>) -> Result<HashSet<PathBuf>, Error> {
>
> it might be a tiny bit nicer to add a new list_index_files_from_path
> that shares the implementation with this one here. While it's not pub
> and there is only one use size, it's still minimally nicer to have this
> encoded in the method name, at least when reading the call site and
> wondering what None means here.
Okay, will adapt this accordingly, thanks!
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2025-04-18 9:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 14:17 [pbs-devel] [RFC proxmox-backup 0/4] implement trash can for snapshots Christian Ebner
2025-04-16 14:18 ` [pbs-devel] [RFC proxmox-backup 1/4] datastore: always skip over base directory when listing index files Christian Ebner
2025-04-17 9:29 ` Fabian Grünbichler
2025-04-17 10:27 ` Christian Ebner
2025-04-16 14:18 ` [pbs-devel] [RFC proxmox-backup 2/4] datastore: allow to specify sub-directory for index file listing Christian Ebner
2025-04-18 9:38 ` Thomas Lamprecht
2025-04-18 9:55 ` Christian Ebner [this message]
2025-04-16 14:18 ` [pbs-devel] [RFC proxmox-backup 3/4] datastore: move snapshots to trash folder on destroy Christian Ebner
2025-04-17 9:29 ` Fabian Grünbichler
2025-04-18 11:06 ` Thomas Lamprecht
2025-04-18 11:49 ` Christian Ebner
2025-04-18 12:03 ` Fabian Grünbichler
2025-04-18 12:45 ` Christian Ebner
2025-04-22 7:54 ` Fabian Grünbichler
2025-04-29 11:27 ` Christian Ebner
2025-04-18 11:51 ` Fabian Grünbichler
2025-04-16 14:18 ` [pbs-devel] [RFC proxmox-backup 4/4] garbage collection: read pruned snapshot index files from trash Christian Ebner
2025-04-17 9:29 ` Fabian Grünbichler
2025-04-17 10:38 ` Christian Ebner
2025-04-17 11:27 ` Fabian Grünbichler
2025-04-17 9:29 ` [pbs-devel] [RFC proxmox-backup 0/4] implement trash can for snapshots 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=e0f8d75b-3a10-4c15-8fff-0f5e0687ef22@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=t.lamprecht@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