]> git.proxmox.com Git - proxmox-backup.git/commit
GC: use time pre phase1 to calculate min_atime in phase2
authorAaron Lauterer <a.lauterer@proxmox.com>
Tue, 21 Jul 2020 15:29:40 +0000 (17:29 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 4 Aug 2020 08:19:05 +0000 (10:19 +0200)
commitd3d566f7bdb6198f87e3db051aa407f626fa183c
tree012634ac9b77440b80fa94e048a837aabd72dd42
parentc96b0de48fe1c41eaa86e8a57862f718270cd272
GC: use time pre phase1 to calculate min_atime in phase2

Used chunks are marked in phase1 of the garbage collection process by
using the atime property. Each used chunk gets touched so that the atime
gets updated (if older than 24h, see relatime).

Should there ever be a situation in which the phase1 in the GC run needs
a very long time to finish, it could happen that the grace period
calculated in phase2 is not long enough and thus the marking of the
chunks (atime) becomes invalid. This would result in the removal of
needed chunks.

Even though the likelyhood of this happening is very low, using the
timestamp from right before phase1 is started, to calculate the grace
period in phase2 should avoid this situation.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
src/backup/chunk_store.rs
src/backup/datastore.rs