summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Farnum <greg@inktank.com>2013-10-21 14:11:28 -0700
committerGreg Farnum <greg@inktank.com>2013-10-21 17:12:12 -0700
commita4347eed4bbf1208c04c18d50619fa1e45ac5b0b (patch)
treebd6944e7c1afec49fe72c564589fdb99a36b28da
parent1376d2379ac2ac3a4fe17fd1bbcf2a8588c7459b (diff)
downloadceph-a4347eed4bbf1208c04c18d50619fa1e45ac5b0b.tar.gz
common: add an hobject_t::is_min() function
Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r--src/common/hobject.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/hobject.h b/src/common/hobject.h
index a769ad060d9..edaf04a301f 100644
--- a/src/common/hobject.h
+++ b/src/common/hobject.h
@@ -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