From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Dietmar Maurer <dietmar@proxmox.com>,
Stefan Reiter <s.reiter@proxmox.com>
Subject: Re: [pbs-devel] [PATCH v4 proxmox-backup 2/2] backup: check all referenced chunks actually exist
Date: Tue, 15 Sep 2020 09:42:15 +0200 [thread overview]
Message-ID: <1f058e9a-a54b-6aef-47f4-6ccb2f4bab68@proxmox.com> (raw)
In-Reply-To: <538882794.11.1600150144899@webmail.proxmox.com>
On 9/15/20 8:09 AM, Dietmar Maurer wrote:
> unrelated question below:
>
> /// Ensure all chunks referenced in this backup actually exist.
>> + /// Only call *after* all writers have been closed, to avoid race with GC.
>> + /// In case of error, mark the previous backup as 'verify failed'.
>> + fn verify_chunk_existance(&self, known_chunks: &KnownChunksMap) -> Result<(), Error> {
>> + for (digest, (_, checked)) in known_chunks.iter() {
>> + if !checked && !self.datastore.chunk_path(digest).0.exists() {
>> + let mark_msg = if let Some(ref last_backup) = self.last_backup {
>> + let last_dir = &last_backup.backup_dir;
>> + let verify_state = SnapshotVerifyState {
>> + state: "failed".to_owned(),
>
> Why is state a String? This should be an enum instead? Please can you take a look at that?
It really should be an enum, no idea why I did not made it one to begin with.
next prev parent reply other threads:[~2020-09-15 7:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 8:50 [pbs-devel] [PATCH v4 proxmox-backup 1/2] backup: check verify state of previous backup before allowing reuse Stefan Reiter
2020-09-14 8:50 ` [pbs-devel] [PATCH v4 proxmox-backup 2/2] backup: check all referenced chunks actually exist Stefan Reiter
2020-09-15 6:09 ` Dietmar Maurer
2020-09-15 7:42 ` Thomas Lamprecht [this message]
2020-09-15 7:47 ` Dietmar Maurer
2020-09-15 8:00 ` [pbs-devel] applied: " Dietmar Maurer
2020-09-15 7:59 ` [pbs-devel] applied: [PATCH v4 proxmox-backup 1/2] backup: check verify state of previous backup before allowing reuse Dietmar Maurer
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=1f058e9a-a54b-6aef-47f4-6ccb2f4bab68@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=dietmar@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=s.reiter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox