diff --git a/src/tools/cephfs/DataScan.h b/src/tools/cephfs/DataScan.h index 6c482e63382..3133be28266 100644 --- a/src/tools/cephfs/DataScan.h +++ b/src/tools/cephfs/DataScan.h @@ -119,19 +119,19 @@ class LocalFileDriver : public RecoveryDriver int init( librados::Rados &rados, const FSMap *fsmap, - fs_cluster_id_t fscid); + fs_cluster_id_t fscid) override; int inject_with_backtrace( const inode_backtrace_t &bt, - const InodeStore &dentry); + const InodeStore &dentry) override; int inject_lost_and_found( inodeno_t ino, - const InodeStore &dentry); + const InodeStore &dentry) override; - int init_roots(int64_t data_pool_id); + int init_roots(int64_t data_pool_id) override; - int check_roots(bool *result); + int check_roots(bool *result) override; }; /** @@ -212,7 +212,7 @@ class MetadataDriver : public RecoveryDriver, public MetadataTool int init( librados::Rados &rados, const FSMap *fsmap, - fs_cluster_id_t fscid); + fs_cluster_id_t fscid) override; int inject_linkage( inodeno_t dir_ino, const std::string &dname, @@ -220,15 +220,15 @@ class MetadataDriver : public RecoveryDriver, public MetadataTool int inject_with_backtrace( const inode_backtrace_t &bt, - const InodeStore &dentry); + const InodeStore &dentry) override; int inject_lost_and_found( inodeno_t ino, - const InodeStore &dentry); + const InodeStore &dentry) override; - int init_roots(int64_t data_pool_id); + int init_roots(int64_t data_pool_id) override; - int check_roots(bool *result); + int check_roots(bool *result) override; }; class DataScan : public MDSUtility, public MetadataTool @@ -322,7 +322,7 @@ class DataScan : public MDSUtility, public MetadataTool { } - ~DataScan() + ~DataScan() override { delete driver; } diff --git a/src/tools/cephfs/MDSUtility.h b/src/tools/cephfs/MDSUtility.h index 5df881a7c6c..9951b3b9ce8 100644 --- a/src/tools/cephfs/MDSUtility.h +++ b/src/tools/cephfs/MDSUtility.h @@ -43,15 +43,15 @@ protected: public: MDSUtility(); - ~MDSUtility(); + ~MDSUtility() override; void handle_fs_map(MFSMap* m); - bool ms_dispatch(Message *m); - bool ms_handle_reset(Connection *con) { return false; } - void ms_handle_remote_reset(Connection *con) {} - bool ms_handle_refused(Connection *con) { return false; } + bool ms_dispatch(Message *m) override; + bool ms_handle_reset(Connection *con) override { return false; } + void ms_handle_remote_reset(Connection *con) override {} + bool ms_handle_refused(Connection *con) override { return false; } bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, - bool force_new); + bool force_new) override; int init(); void shutdown(); }; diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 4c1c474b91e..61902f321d0 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -490,7 +490,7 @@ class RadosWatchCtx : public librados::WatchCtx2 { string name; public: RadosWatchCtx(IoCtx& io, const char *imgname) : ioctx(io), name(imgname) {} - ~RadosWatchCtx() {} + ~RadosWatchCtx() override {} void handle_notify(uint64_t notify_id, uint64_t cookie, uint64_t notifier_id, @@ -996,7 +996,7 @@ protected: public: RadosBencher(CephContext *cct_, librados::Rados& _r, librados::IoCtx& _i) : ObjBencher(cct_), completions(NULL), rados(_r), io_ctx(_i), iterator_valid(false), write_destination(OP_WRITE_DEST_OBJ) {} - ~RadosBencher() { } + ~RadosBencher() override { } void set_write_destination(OpWriteDest dest) { write_destination = dest; diff --git a/src/tools/rbd/action/Export.cc b/src/tools/rbd/action/Export.cc index eae06aeb51f..e41920819b6 100644 --- a/src/tools/rbd/action/Export.cc +++ b/src/tools/rbd/action/Export.cc @@ -74,7 +74,7 @@ public: } protected: - virtual void finish(int r) { + void finish(int r) override { if (r >= 0) { if (m_exists) { m_exists = !m_read_data.is_zero();