]> 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)
committerSage Weil <sage@redhat.com>
Wed, 15 Aug 2018 22:18:43 +0000 (17:18 -0500)
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>
src/os/ObjectMap.h
src/os/filestore/DBObjectMap.h

index 8d0a39e423465c71ed46333764826e7a154b101c..0d0b4bd5ff0cdd5c7da525752a8beb244ed5293d 100644 (file)
@@ -162,6 +162,7 @@ public:
     return ObjectMapIterator();
   }
 
+  virtual KeyValueDB *get_db() { return nullptr; }
 
   ObjectMap(CephContext* cct) : cct(cct) {}
   virtual ~ObjectMap() {}
index 7746483c3d3ab8ccc3634a950aa01915e0849363..0a61322cd6dc7eeaaf98a2c9c21b1667d7f7856d 100644 (file)
@@ -58,6 +58,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
    */