summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-09-26 12:31:35 -0700
committerSamuel Just <sam.just@inktank.com>2013-10-04 13:49:55 -0700
commite73ec48371fffbb16b03e57b157e35c087e0b342 (patch)
tree0ab07969d61b46fc9da1d9a18c3b0c9b836aa904
parentc8a4411db11b085ea0678bcf3f51aa411bd3e106 (diff)
downloadceph-e73ec48371fffbb16b03e57b157e35c087e0b342.tar.gz
common/hobject: add is_degenerate method
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/common/hobject.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/hobject.h b/src/common/hobject.h
index e483b664347..0a140c3089b 100644
--- a/src/common/hobject.h
+++ b/src/common/hobject.h
@@ -251,6 +251,10 @@ public:
return get_filestore_key_u32();
}
+ bool is_degenerate() const {
+ return generation == NO_GEN && shard_id == NO_SHARD;
+ }
+
// maximum sorted value.
static ghobject_t get_max() {
ghobject_t h(hobject_t::get_max());