From: Sage Weil Date: Tue, 10 Apr 2018 17:55:55 +0000 (-0500) Subject: os/ObjectMap: add get_db() accessor X-Git-Tag: v12.2.13~172^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=32ffd5380b72c26bbb7d2b35c91e7a4111e5b54b;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 32b423c2861..e88b6864c01 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 fb1653e489d..5076118b9ea 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 */