The man page sayeth:
"dss removes any snapshots older than n times u",
where n is the number of unit intervals and u is the duration of
a unit interval. As intervals count from zero, this means that a
snapshot should be considered outdated if its interval number
is greater _or equal_ than n.
However, the current code only removes snapshots in intervals
strictly greater than n. Fix this bug and clarify the documentation.
int i;
struct snapshot *s;
- DSS_DEBUG_LOG("looking for snapshots belonging to intervals greater than %d\n",
+ DSS_DEBUG_LOG("looking for snapshots belonging to intervals >= %d\n",
conf.num_intervals_arg);
FOR_EACH_SNAPSHOT(s, i, sl) {
if (snapshot_is_being_created(s))
continue;
if (is_reference_snapshot(s))
continue;
- if (s->interval <= conf.num_intervals_arg)
+ if (s->interval < conf.num_intervals_arg)
continue;
return s;
}
"Remove redundant and outdated snapshots"
group="command"
details="
- A snapshot is considered outdated if it belongs to an interval
- greater than the maximum number of intervals. It is said to be
- redundant if it belongs to an interval that already contains
- more than the desired number of snapshots. This command gets
- rid of such snapshots.
+ A snapshot is considered outdated if its interval number
+ is greater or equal than the specified number of unit
+ intervals. See the \"Intervals\" section below for the precise
+ definition of these terms.
+
+ A snapshot is said to be redundant if it belongs to an
+ interval that already contains more than the desired number
+ of snapshots.
+
+ The prune command gets rid of both outdated and redundant
+ snapshots.
"
groupoption "ls" L