]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/ObjectStore: add collection_bits
authorSage Weil <sage@redhat.com>
Thu, 7 Jan 2016 02:34:09 +0000 (21:34 -0500)
committerSage Weil <sage@redhat.com>
Wed, 27 Jan 2016 19:06:13 +0000 (14:06 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/ObjectStore.h

index 5ba83bf373a44346fbb8e27f2bb80abe5d2ef61c..b7239723c28df08a5332ac1ae0902838390edfbf 100644 (file)
@@ -2143,6 +2143,17 @@ public:
    */
   virtual bool collection_empty(coll_t c) = 0;
 
+  /**
+   * return the number of significant bits of the coll_t::pgid.
+   *
+   * This should return what the last create_collection or split_collection
+   * set.  A lazy backend can choose not to store and report this (e.g.,
+   * FileStore).
+   */
+  virtual int collection_bits(coll_t c) {
+    return -EOPNOTSUPP;
+  }
+
   /**
    * list contents of a collection that fall in the range [start, end) and no more than a specified many result
    *
@@ -2160,6 +2171,7 @@ public:
                              bool sort_bitwise, int max,
                              vector<ghobject_t> *ls, ghobject_t *next) = 0;
 
+
   /// OMAP
   /// Get omap contents
   virtual int omap_get(