}
-static int remove_snapshot(struct snapshot *s)
+static int remove_snapshot(struct snapshot *s, char *why)
{
int fds[3] = {0, 0, 0};
assert(!rm_pid);
if (ret < 0)
goto out;
- DSS_NOTICE_LOG("removing %s (interval = %i)\n", s->name, s->interval);
+ DSS_NOTICE_LOG("removing %s snapshot %s (interval = %i)\n",
+ why, s->name, s->interval);
ret = dss_exec(&rm_pid, argv[0], argv, fds);
out:
free(new_name);
victim->name, victim->interval);
continue;
}
- ret = remove_snapshot(victim);
+ ret = remove_snapshot(victim, "redundant");
return ret < 0? ret : 1;
}
return 0;
s->name, s->interval);
continue;
}
- ret = remove_snapshot(s);
+ ret = remove_snapshot(s, "outdated");
if (ret < 0)
return ret;
return 1;
DSS_INFO_LOG("oldest snapshot: %s\n", s->name);
if (snapshot_is_being_created(s))
return 0;
- return remove_snapshot(s);
+ return remove_snapshot(s, "oldest");
}
static int rename_incomplete_snapshot(int64_t start)