Previously the space was only marked as free when the file was physically
removed (which happens async) which resulted in the buffer immediately
being seen as full.
if (errno != ENOTEMPTY)
tvhlog(LOG_ERR, "timeshift", "failed to remove %s [e=%s]",
dpath, strerror(errno));
- atomic_add_u64(×hift_total_size, -tsf->size);
/* Free memory */
while ((ti = TAILQ_FIRST(&tsf->iframes))) {
if (tsf->fd != -1)
close(tsf->fd);
TAILQ_REMOVE(&ts->files, tsf, link);
+ atomic_add_u64(×hift_total_size, -tsf->size);
timeshift_reaper_remove(tsf);
}