From 88a95b7b13148c83f5e6fe77e9886c4aa85a0829 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 28 Jan 2016 02:15:26 -0800 Subject: [PATCH] os/*stores: fix hidden warnings the CollectionHandle variant methods are hidden by the subclasses who do not override it. so the compiler complains. by adding "using" statement we expose them again. Signed-off-by: Kefu Chai --- src/os/bluestore/BlueRocksEnv.cc | 2 ++ src/os/filestore/FileStore.h | 13 +++++++++++++ src/os/kstore/KStore.h | 13 +++++++++++++ src/os/memstore/MemStore.h | 8 ++++++++ 4 files changed, 36 insertions(+) diff --git a/src/os/bluestore/BlueRocksEnv.cc b/src/os/bluestore/BlueRocksEnv.cc index 252bdbd12a40c..c89d57d24fdcd 100644 --- a/src/os/bluestore/BlueRocksEnv.cc +++ b/src/os/bluestore/BlueRocksEnv.cc @@ -255,6 +255,7 @@ class BlueRocksWritableFile : public rocksdb::WritableFile { return rocksdb::Status::OK(); } + using rocksdb::WritableFile::RangeSync; // Sync a file range with disk. // offset is the starting byte of the file range to be synchronized. // nbytes specifies the length of the range to be synchronized. @@ -273,6 +274,7 @@ class BlueRocksWritableFile : public rocksdb::WritableFile { } protected: + using rocksdb::WritableFile::Allocate; /* * Pre-allocate space for a file. */ diff --git a/src/os/filestore/FileStore.h b/src/os/filestore/FileStore.h index 8cf9570f0cd71..fec7600a3b777 100644 --- a/src/os/filestore/FileStore.h +++ b/src/os/filestore/FileStore.h @@ -529,12 +529,15 @@ public: int pick_object_revision_lt(ghobject_t& oid) { return 0; } + using ObjectStore::exists; bool exists(const coll_t& cid, const ghobject_t& oid); + using ObjectStore::stat; int stat( const coll_t& cid, const ghobject_t& oid, struct stat *st, bool allow_eio = false); + using ObjectStore::read; int read( const coll_t& cid, const ghobject_t& oid, @@ -547,6 +550,7 @@ public: map *m); int _do_seek_hole_data(int fd, uint64_t offset, size_t len, map *m); + using ObjectStore::fiemap; int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl); int _touch(const coll_t& cid, const ghobject_t& oid); @@ -598,6 +602,8 @@ public: int snapshot(const string& name); // attrs + using ObjectStore::getattr; + using ObjectStore::getattrs; int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr &bp); int getattrs(const coll_t& cid, const ghobject_t& oid, map& aset); @@ -619,6 +625,7 @@ public: const SequencerPosition &spos); // collections + using ObjectStore::collection_list; int collection_list(const coll_t& c, ghobject_t start, ghobject_t end, bool sort_bitwise, int max, vector *ls, ghobject_t *next); @@ -630,18 +637,24 @@ public: bool collection_empty(const coll_t& c); // omap (see ObjectStore.h for documentation) + using ObjectStore::omap_get; int omap_get(const coll_t& c, const ghobject_t &oid, bufferlist *header, map *out); + using ObjectStore::omap_get_header; int omap_get_header( const coll_t& c, const ghobject_t &oid, bufferlist *out, bool allow_eio = false); + using ObjectStore::omap_get_keys; int omap_get_keys(const coll_t& c, const ghobject_t &oid, set *keys); + using ObjectStore::omap_get_values; int omap_get_values(const coll_t& c, const ghobject_t &oid, const set &keys, map *out); + using ObjectStore::omap_check_keys; int omap_check_keys(const coll_t& c, const ghobject_t &oid, const set &keys, set *out); + using ObjectStore::get_omap_iterator; ObjectMap::ObjectMapIterator get_omap_iterator(const coll_t& c, const ghobject_t &oid); int _create_collection(const coll_t& c, const SequencerPosition &spos); diff --git a/src/os/kstore/KStore.h b/src/os/kstore/KStore.h index c6c1f3ab70689..f1fca55e97420 100644 --- a/src/os/kstore/KStore.h +++ b/src/os/kstore/KStore.h @@ -402,12 +402,15 @@ public: int statfs(struct statfs *buf); + using ObjectStore::exists; bool exists(const coll_t& cid, const ghobject_t& oid); + using ObjectStore::stat; int stat( const coll_t& cid, const ghobject_t& oid, struct stat *st, bool allow_eio = false); // struct stat? + using ObjectStore::read; int read( const coll_t& cid, const ghobject_t& oid, @@ -423,18 +426,23 @@ public: bufferlist& bl, uint32_t op_flags = 0); + using ObjectStore::fiemap; int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl); + using ObjectStore::getattr; int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr& value); + using ObjectStore::getattrs; int getattrs(const coll_t& cid, const ghobject_t& oid, map& aset); int list_collections(vector& ls); bool collection_exists(const coll_t& c); bool collection_empty(const coll_t& c); + using ObjectStore::collection_list; int collection_list(const coll_t& cid, ghobject_t start, ghobject_t end, bool sort_bitwise, int max, vector *ls, ghobject_t *next); + using ObjectStore::omap_get; int omap_get( const coll_t& cid, ///< [in] Collection containing oid const ghobject_t &oid, ///< [in] Object containing omap @@ -442,6 +450,7 @@ public: map *out /// < [out] Key to value map ); + using ObjectStore::omap_get_header; /// Get omap header int omap_get_header( const coll_t& cid, ///< [in] Collection containing oid @@ -450,6 +459,7 @@ public: bool allow_eio = false ///< [in] don't assert on eio ); + using ObjectStore::omap_get_keys; /// Get keys defined on oid int omap_get_keys( const coll_t& cid, ///< [in] Collection containing oid @@ -457,6 +467,7 @@ public: set *keys ///< [out] Keys defined on oid ); + using ObjectStore::omap_get_values; /// Get key values int omap_get_values( const coll_t& cid, ///< [in] Collection containing oid @@ -465,6 +476,7 @@ public: map *out ///< [out] Returned keys and values ); + using ObjectStore::omap_check_keys; /// Filters keys into out which are defined on oid int omap_check_keys( const coll_t& cid, ///< [in] Collection containing oid @@ -473,6 +485,7 @@ public: set *out ///< [out] Subset of keys defined on oid ); + using ObjectStore::get_omap_iterator; ObjectMap::ObjectMapIterator get_omap_iterator( const coll_t& cid, ///< [in] collection const ghobject_t &oid ///< [in] object diff --git a/src/os/memstore/MemStore.h b/src/os/memstore/MemStore.h index 823a79f0f335f..06ad0f61a078e 100644 --- a/src/os/memstore/MemStore.h +++ b/src/os/memstore/MemStore.h @@ -407,6 +407,7 @@ public: bufferlist& bl, uint32_t op_flags = 0, bool allow_eio = false) override; + using ObjectStore::fiemap; int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl); int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr& value) override; @@ -424,10 +425,12 @@ public: } bool collection_exists(const coll_t& c); bool collection_empty(const coll_t& c); + using ObjectStore::collection_list; int collection_list(const coll_t& cid, ghobject_t start, ghobject_t end, bool sort_bitwise, int max, vector *ls, ghobject_t *next); + using ObjectStore::omap_get; int omap_get( const coll_t& cid, ///< [in] Collection containing oid const ghobject_t &oid, ///< [in] Object containing omap @@ -435,6 +438,7 @@ public: map *out /// < [out] Key to value map ); + using ObjectStore::omap_get_header; /// Get omap header int omap_get_header( const coll_t& cid, ///< [in] Collection containing oid @@ -443,6 +447,7 @@ public: bool allow_eio = false ///< [in] don't assert on eio ); + using ObjectStore::omap_get_keys; /// Get keys defined on oid int omap_get_keys( const coll_t& cid, ///< [in] Collection containing oid @@ -450,6 +455,7 @@ public: set *keys ///< [out] Keys defined on oid ); + using ObjectStore::omap_get_values; /// Get key values int omap_get_values( const coll_t& cid, ///< [in] Collection containing oid @@ -458,6 +464,7 @@ public: map *out ///< [out] Returned keys and values ); + using ObjectStore::omap_check_keys; /// Filters keys into out which are defined on oid int omap_check_keys( const coll_t& cid, ///< [in] Collection containing oid @@ -466,6 +473,7 @@ public: set *out ///< [out] Subset of keys defined on oid ); + using ObjectStore::get_omap_iterator; ObjectMap::ObjectMapIterator get_omap_iterator( const coll_t& cid, ///< [in] collection const ghobject_t &oid ///< [in] object -- 2.39.5