[pbs-devel] [PATCH v2 proxmox-backup 4/5] backup: check all referenced chunks actually exist

Dietmar Maurer dietmar at proxmox.com
Tue Sep 8 12:49:26 CEST 2020


>  
>  use ::serde::{Serialize};
>  use serde_json::{json, Value};
> @@ -73,6 +73,7 @@ struct SharedBackupState {
>      dynamic_writers: HashMap<usize, DynamicWriterState>,
>      fixed_writers: HashMap<usize, FixedWriterState>,
>      known_chunks: HashMap<[u8;32], u32>,
> +    touched_chunks: HashSet<[u8;32]>,
>      backup_size: u64, // sums up size of all files
>      backup_stat: UploadStatistic,

Instead of touched_chunks, can we store that info inside known_chunks?

-      known_chunks: HashMap<[u8;32], u32>,
+      known_chunks: HashMap<[u8;32], (u32, bool)>,





More information about the pbs-devel mailing list