]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
hobject: enforce max canonical value 9432/head
authorSamuel Just <sjust@redhat.com>
Fri, 3 Jun 2016 00:38:05 +0000 (17:38 -0700)
committerSamuel Just <sjust@redhat.com>
Mon, 6 Jun 2016 16:34:09 +0000 (09:34 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/common/hobject.cc
src/common/hobject.h

index 8c3f9a2692da7c692e29753346e0d0436a85337c..dc76e8b552434084713c1fe809e20eef91c3307c 100644 (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);
 }
 
index 69bb61116025da03f7c50c12cfa4f912b13c5b69..d15426ee624a42db17cb9fa18ca52e3a3acf4d60 100644 (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 {