From: Sage Weil Date: Tue, 10 Apr 2018 17:55:55 +0000 (-0500) Subject: os/ObjectMap: add get_db() accessor X-Git-Tag: v14.0.1~569^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c82e66dde715e5e4e12261655c5e7b521871453;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 --- diff --git a/src/os/ObjectMap.h b/src/os/ObjectMap.h index 8d0a39e42346..0d0b4bd5ff0c 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 7746483c3d3a..0a61322cd6dc 100644 --- a/src/os/filestore/DBObjectMap.h +++ b/src/os/filestore/DBObjectMap.h @@ -58,6 +58,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 */