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 <sage@redhat.com>
This commit is contained in:
Sage Weil 2018-04-10 12:55:55 -05:00
parent 13295a3883
commit 6c82e66dde
2 changed files with 3 additions and 0 deletions

View File

@ -162,6 +162,7 @@ public:
return ObjectMapIterator();
}
virtual KeyValueDB *get_db() { return nullptr; }
ObjectMap(CephContext* cct) : cct(cct) {}
virtual ~ObjectMap() {}

View 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
*/