]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/ObjectMap: add get_db() accessor
authorSage Weil <sage@redhat.com>
Tue, 10 Apr 2018 17:55:55 +0000 (12:55 -0500)
committerJosh Durgin <jdurgin@redhat.com>
Wed, 3 Jul 2019 00:11:57 +0000 (20:11 -0400)
This is just to let us get at the underlying KeyValueDB for DBObjectMap.
It is not really better or worse than adding accessors for things like
GetEstimatedSize() to ObjectMap.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 6c82e66dde715e5e4e12261655c5e7b521871453)

src/os/ObjectMap.h
src/os/filestore/DBObjectMap.h

index 4db3f17dc4ba59d973051d3f10c0c5778c511b50..31d413d7fee269c01f78b259c2cc86e3b7fd2bf8 100644 (file)
@@ -162,6 +162,7 @@ public:
     return ObjectMapIterator();
   }
 
+  virtual KeyValueDB *get_db() { return nullptr; }
 
   ObjectMap(CephContext* cct) : cct(cct) {}
   virtual ~ObjectMap() {}
index 4d9bda912cbde8779382ed743ab8e1649b4fc744..15d74aa87af2cb88cd1ef01e05389c304bc091d8 100644 (file)
@@ -59,6 +59,8 @@ class DBObjectMap : public ObjectMap {
 public:
   boost::scoped_ptr<KeyValueDB> db;
 
+  KeyValueDB *get_db() override { return db.get(); }
+
   /**
    * Serializes access to next_seq as well as the in_use set
    */