]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: add an hobject_t::is_min() function
authorGreg Farnum <greg@inktank.com>
Mon, 21 Oct 2013 21:11:28 +0000 (14:11 -0700)
committerSamuel Just <sam.just@inktank.com>
Sun, 27 Oct 2013 17:40:32 +0000 (10:40 -0700)
Signed-off-by: Greg Farnum <greg@inktank.com>
src/common/hobject.h

index a769ad060d925989028a68bb5a5a2ff7a1e27331..edaf04a301fd64817da8d69d97c762d394a17a80 100644 (file)
@@ -118,6 +118,13 @@ public:
   bool is_max() const {
     return max;
   }
+  bool is_min() const {
+    // this needs to match how it's constructed
+    return snap == 0 &&
+          hash == 0 &&
+          !max &&
+          pool == -1;
+  }
 
   static uint32_t _reverse_nibbles(uint32_t retval) {
     // reverse nibbles