forked from proxmox-mirrors/proxmox-backup
Check if the filesystem backing the chunk store actually updates the atime to avoid potential data loss in phase 2 of garbage collection, in case the atime update is not honored. Perform the check before phase 1 of garbage collection, as well as on datastore creation. The latter to early detect and disallow datastore creation on filesystem configurations which otherwise most likely would lead to data losses. To perform the check also when reusing an existing datastore, open the chunks store also on reuse. Enable the atime update check by default, but allow to opt-out by setting a datastore tuning parameter flag for backwards compatibility. This is honored by both, garbage collection and datastore creation. The check uses a 4 MiB fixed sized, unencypted and compressed chunk as test marker, inserted if not present. This all zero-chunk is very likely anyways for unencrypted backup contents with large all-zero regions using fixed size chunking (e.g. VMs). To avoid cases were the timestamp will not be updated because of the Linux kernels timestamp granularity, sleep in-between chunk insert (including an atime update if pre-existing) and the subsequent stating + utimensat for 1 second. Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=5982 Signed-off-by: Christian Ebner <c.ebner@proxmox.com> |
||
|---|---|---|
| .. | ||
| acme | ||
| api2 | ||
| backup | ||
| bin | ||
| config | ||
| server | ||
| tape | ||
| tools | ||
| auth_helpers.rs | ||
| auth.rs | ||
| client_helpers.rs | ||
| lib.rs | ||
| traffic_control_cache.rs | ||