hobject: enforce max canonical value

Signed-off-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
Samuel Just 2016-06-02 17:38:05 -07:00
parent 7c5f2acaa5
commit cef5151a62
2 changed files with 2 additions and 0 deletions

View File

@ -112,6 +112,7 @@ void hobject_t::encode(bufferlist& bl) const
::encode(max, bl);
::encode(nspace, bl);
::encode(pool, bl);
assert(!max || (*this == hobject_t(hobject_t::get_max())));
ENCODE_FINISH(bl);
}

View File

@ -179,6 +179,7 @@ public:
}
bool is_max() const {
assert(!max || (*this == hobject_t(hobject_t::get_max())));
return max;
}
bool is_min() const {