Scrub doesn't want to split snapshot sets across chunks. The range,
however, is exclusive on the right. get_max_object_boundary() gives
us a way to always include head and all snapshots in the same chunk
as it will sort greater than any legal object with the same head.
Signed-off-by: Samuel Just <sjust@redhat.com>
return ret;
}
+ /// @return min hobject_t ret s.t. ret.get_head() == get_head()
hobject_t get_object_boundary() const {
if (is_max())
return *this;
return ret;
}
+ /// @return max hobject_t ret s.t. ret.get_head() == get_head()
+ hobject_t get_max_object_boundary() const {
+ if (is_max())
+ return *this;
+ // CEPH_SNAPDIR happens to sort above HEAD and MAX_SNAP and is no longer used
+ // for actual objects
+ return get_snapdir();
+ }
+
/// @return head version of this hobject_t
hobject_t get_head() const {
hobject_t ret(*this);