proxmox-backup/src/api2
Stefan Reiter a9767cf7de gc: remove .bad files on garbage collect
The iterator of get_chunk_iterator is extended with a third parameter
indicating whether the current file is a chunk (false) or a .bad file
(true).

Count their sizes to the total of removed bytes, since it also frees
disk space.

.bad files are only deleted if the corresponding chunk exists, i.e. has
been rewritten. Otherwise we might delete data only marked bad because
of transient errors.

While at it, also clean up and use nix::unistd::unlinkat instead of
unsafe libc calls.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-09-08 12:43:13 +02:00
..
access introduce Username, Realm and Userid api types 2020-08-10 12:05:01 +02:00
admin tools/systemd/time: convert the resulting timestamp into an option 2020-09-04 15:28:05 +02:00
backup backup: lock base snapshot and ensure existance on finish 2020-08-11 11:04:47 +02:00
config config/jobstate: replace Job:load with create_state_file 2020-08-14 06:38:02 +02:00
node api2/node/services: turn service api calls into workers 2020-08-14 12:37:17 +02:00
reader introduce Username, Realm and Userid api types 2020-08-10 12:05:01 +02:00
types gc: remove .bad files on garbage collect 2020-09-08 12:43:13 +02:00
access.rs replace and remove old ticket functions 2020-08-12 14:28:21 +02:00
admin.rs api2: add admin/sync endpoint 2020-05-29 11:31:32 +02:00
backup.rs backup: lock base snapshot and ensure existance on finish 2020-08-11 11:04:47 +02:00
config.rs rename 'job' to 'sync' 2020-05-21 10:29:25 +02:00
helpers.rs bump proxmox to 0.3, cleanup http_err macro usage 2020-07-29 09:38:36 +02:00
node.rs replace and remove old ticket functions 2020-08-12 14:28:21 +02:00
pull.rs cleanup: replace id from do_sync_job with info from job 2020-08-14 06:36:43 +02:00
reader.rs introduce Username, Realm and Userid api types 2020-08-10 12:05:01 +02:00
status.rs fix #2978: allow non-root to view datastore usage 2020-09-04 06:18:20 +02:00
version.rs switch from failure to anyhow 2020-04-17 18:43:30 +02:00