From: Dietmar Maurer <dietmar@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup 1/3] verify: check all chunks of an index, even if we encounter a corrupt one
Date: Thu, 30 Jul 2020 09:40:12 +0200 (CEST) [thread overview]
Message-ID: <19145169.73.1596094813081@webmail.proxmox.com> (raw)
In-Reply-To: <20200730070905.10735-1-d.csapak@proxmox.com>
applied all three patches
> On 07/30/2020 9:09 AM Dominik Csapak <d.csapak@proxmox.com> wrote:
>
>
> this makes it easier to see which chunks are corrupt
> (and enables us in the future to build a 'complete' list of
> corrupt chunks)
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> src/backup/verify.rs | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/src/backup/verify.rs b/src/backup/verify.rs
> index 33aaa621..9e309b12 100644
> --- a/src/backup/verify.rs
> +++ b/src/backup/verify.rs
> @@ -42,6 +42,7 @@ fn verify_index_chunks(
> worker: &WorkerTask,
> ) -> Result<(), Error> {
>
> + let mut errors = 0;
> for pos in 0..index.index_count() {
>
> worker.fail_on_abort()?;
> @@ -50,11 +51,19 @@ fn verify_index_chunks(
> let size = info.range.end - info.range.start;
>
> if !verified_chunks.contains(&info.digest) {
> - datastore.verify_stored_chunk(&info.digest, size)?;
> - verified_chunks.insert(info.digest);
> + if let Err(err) = datastore.verify_stored_chunk(&info.digest, size) {
> + worker.log(format!("{}", err));
> + errors += 1;
> + } else {
> + verified_chunks.insert(info.digest);
> + }
> }
> }
>
> + if errors > 0 {
> + bail!("chunks could not be verified");
> + }
> +
> Ok(())
> }
>
> --
> 2.20.1
>
>
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
prev parent reply other threads:[~2020-07-30 7:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 7:09 [pbs-devel] " Dominik Csapak
2020-07-30 7:09 ` [pbs-devel] [PATCH proxmox-backup 2/3] verify: keep also track of corrupt chunks Dominik Csapak
2020-07-30 7:09 ` [pbs-devel] [PATCH proxmox-backup 3/3] verify: keep track and log which dirs failed the verification Dominik Csapak
2020-07-30 7:40 ` Dietmar Maurer [this message]
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=19145169.73.1596094813081@webmail.proxmox.com \
--to=dietmar@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pbs-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox