if (keep >= num)
missing += keep - num;
-// DSS_DEBUG_LOG("interval %i: keep: %u, have: %u, missing: %u\n",
-// interval, keep, num, missing);
if (keep + missing >= num)
continue;
/* redundant snapshot in this interval, pick snapshot with lowest score */
continue;
if (is_reference_snapshot(s))
continue;
- //DSS_DEBUG_LOG("checking %s\n", s->name);
if (s->interval > interval) {
prev = s;
continue;
/* check if s is a better victim */
this_score = s->creation_time - prev->creation_time;
assert(this_score >= 0);
- //DSS_DEBUG_LOG("%s: score %lli\n", s->name, (long long)score);
if (this_score < score) {
score = this_score;
victim = s;
static void generic_signal_handler(int s)
{
write(signal_pipe[1], &s, sizeof(int));
- //fprintf(stderr, "got sig %i\n", s);
}
/**
if (num > now)
return 0;
s->creation_time = num;
- //DSS_DEBUG_LOG("%s start time: %lli\n", dirname, (long long)s->creation_time);
s->interval = (long long) ((now - s->creation_time)
/ unit_interval / 24 / 3600);
if (!strcmp(dash + 1, "incomplete")) {