From: Sage Weil Date: Tue, 10 Apr 2018 17:55:55 +0000 (-0500) Subject: os/ObjectMap: add get_db() accessor X-Git-Tag: v13.2.7~271^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8e95904e25a8b1fc731ba3ef57f0949987a0b4f9;p=ceph.git os/ObjectMap: add get_db() accessor 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 (cherry picked from commit 6c82e66dde715e5e4e12261655c5e7b521871453) --- diff --git a/src/os/ObjectMap.h b/src/os/ObjectMap.h index 4db3f17dc4ba5..31d413d7fee26 100644 --- a/src/os/ObjectMap.h +++ b/src/os/ObjectMap.h @@ -162,6 +162,7 @@ public: return ObjectMapIterator(); } + virtual KeyValueDB *get_db() { return nullptr; } ObjectMap(CephContext* cct) : cct(cct) {} virtual ~ObjectMap() {} diff --git a/src/os/filestore/DBObjectMap.h b/src/os/filestore/DBObjectMap.h index 4d9bda912cbde..15d74aa87af2c 100644 --- a/src/os/filestore/DBObjectMap.h +++ b/src/os/filestore/DBObjectMap.h @@ -59,6 +59,8 @@ class DBObjectMap : public ObjectMap { public: boost::scoped_ptr db; + KeyValueDB *get_db() override { return db.get(); } + /** * Serializes access to next_seq as well as the in_use set */