]> git.proxmox.com Git - proxmox-backup.git/commit - src/backup/verify.rs
verify: rename corrupted chunks with .bad extension
authorStefan Reiter <s.reiter@proxmox.com>
Mon, 7 Sep 2020 15:30:33 +0000 (17:30 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 8 Sep 2020 10:20:57 +0000 (12:20 +0200)
commit0f3b7efa84490699051e64e3ed63fcd320903842
treeefc180b97f875e60d88955edc8d6154027d688f3
parent7c77e2f94ad95a4753a7ff936359d7e71ff02fc7
verify: rename corrupted chunks with .bad extension

This ensures that following backups will always upload the chunk,
thereby replacing it with a correct version again.

Format for renaming is <digest>.<counter>.bad where <counter> is used if
a chunk is found to be bad again before a GC cleans it up.

Care has been taken to deliberately only rename a chunk in conditions
where it is guaranteed to be an error in the chunk itself. Otherwise a
broken index file could lead to an unwanted mass-rename of chunks.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
src/backup/verify.rs