]> git-server-git.apps.pok.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>
Tue, 2 Jul 2019 04:33:23 +0000 (00:33 -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 32b423c2861681ac41b179a527cd7d9c8c7fbbe9..e88b6864c01bc05564f7b634db4f6f5825fb4846 100644 (file)
@@ -162,6 +162,7 @@ public:
     return ObjectMapIterator();
   }
 
+  virtual KeyValueDB *get_db() { return nullptr; }
 
   ObjectMap(CephContext* cct) : cct(cct) {}
   virtual ~ObjectMap() {}
index fb1653e489d0e4070a98f2c20a744873b1c1ab77..5076118b9ea56d27b964e4144fabf5bb90ce5345 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
    */