]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: add override in headers files 13962/head
authorliuchang0812 <liuchang0812@gmail.com>
Wed, 22 Feb 2017 11:43:11 +0000 (19:43 +0800)
committerliuchang0812 <liuchang0812@gmail.com>
Sat, 25 Mar 2017 04:55:38 +0000 (12:55 +0800)
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
40 files changed:
src/os/FuseStore.h
src/os/ObjectStore.h
src/os/bluestore/BitAllocator.h
src/os/bluestore/BitMapAllocator.h
src/os/bluestore/BlueFS.h
src/os/bluestore/BlueRocksEnv.cc
src/os/bluestore/BlueRocksEnv.h
src/os/bluestore/BlueStore.h
src/os/bluestore/KernelDevice.h
src/os/bluestore/StupidAllocator.h
src/os/filestore/BtrfsFileStoreBackend.h
src/os/filestore/DBObjectMap.h
src/os/filestore/FDCache.h
src/os/filestore/FileJournal.h
src/os/filestore/FileStore.h
src/os/filestore/GenericFileStoreBackend.h
src/os/filestore/HashIndex.h
src/os/filestore/JournalingObjectStore.h
src/os/filestore/LFNIndex.h
src/os/filestore/WBThrottle.h
src/os/filestore/XfsFileStoreBackend.h
src/os/fs/XFS.h
src/os/kstore/KStore.h
src/os/memstore/MemStore.h
src/osd/ECBackend.cc
src/osd/ECBackend.h
src/osd/HitSet.h
src/osd/OSD.h
src/osd/OSDMapMapping.h
src/osd/OpRequest.h
src/osd/PG.h
src/osd/PGLog.h
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h
src/osd/ReplicatedBackend.cc
src/osd/ReplicatedBackend.h
src/osd/SnapMapper.h
src/osdc/ObjectCacher.h
src/osdc/Objecter.cc
src/osdc/Objecter.h

index 04681e645c20b7cba35fdb2acb4727893fd3a5be..db39ca5ef40df3d2b999e06390d8f3f94d878350 100644 (file)
@@ -36,7 +36,7 @@ public:
     FuseStore *fs;
   public:
     explicit FuseThread(FuseStore *f) : fs(f) {}
-    void *entry() {
+    void *entry() override {
       fs->loop();
       return NULL;
     }
index 2a9c28777471a2223acbb9a1360edce9f0e330fd..34f28875d1da3a26869c2388c2a89edc446881ee 100644 (file)
@@ -159,7 +159,7 @@ public:
       ) = 0; ///< @return true if idle, false otherwise
 
     Sequencer_impl(CephContext* cct) : RefCountedObject(NULL, 0), cct(cct)  {}
-    virtual ~Sequencer_impl() {}
+    ~Sequencer_impl() override {}
   };
   typedef boost::intrusive_ptr<Sequencer_impl> Sequencer_implRef;
 
index 730cfd0c9a99852c28bf66e22134239905363672..9f684251b5d158476cf015e4f4fab8fa9bc11264 100644 (file)
@@ -363,23 +363,23 @@ public:
   static int64_t total_blocks;
   static void incr_count() { count++;}
   static int64_t get_total_blocks() {return total_blocks;}
-  bool is_allocated(int64_t start_block, int64_t num_blocks);
-  bool is_exhausted();
+  bool is_allocated(int64_t start_block, int64_t num_blocks) override;
+  bool is_exhausted() override;
   void reset_marker();
 
-  int64_t sub_used_blocks(int64_t num_blocks);
-  int64_t add_used_blocks(int64_t num_blocks);
-  bool reserve_blocks(int64_t num_blocks);
-  void unreserve(int64_t num_blocks, int64_t allocated);
-  int64_t get_reserved_blocks();
-  int64_t get_used_blocks();
-  int64_t size() {
+  int64_t sub_used_blocks(int64_t num_blocks) override;
+  int64_t add_used_blocks(int64_t num_blocks) override;
+  bool reserve_blocks(int64_t num_blocks) override;
+  void unreserve(int64_t num_blocks, int64_t allocated) override;
+  int64_t get_reserved_blocks() override;
+  int64_t get_used_blocks() override;
+  int64_t size() override {
     return get_total_blocks();
   }
 
-  void lock_excl();
-  bool lock_excl_try();
-  void unlock();
+  void lock_excl() override;
+  bool lock_excl_try() override;
+  void unlock() override;
   bool check_locked();
 
   void free_blocks_int(int64_t start_block, int64_t num_blocks);
@@ -388,14 +388,14 @@ public:
   BitMapZone(CephContext* cct, int64_t total_blocks, int64_t zone_num);
   BitMapZone(CephContext* cct, int64_t total_blocks, int64_t zone_num, bool def);
 
-  ~BitMapZone();
-  void shutdown();
+  ~BitMapZone() override;
+  void shutdown() override;
   int64_t alloc_blocks_dis(int64_t num_blocks, int64_t min_alloc, int64_t hint,
-        int64_t blk_off, ExtentList *block_list);  
-  void set_blocks_used(int64_t start_block, int64_t num_blocks);
+        int64_t blk_off, ExtentList *block_list) override;  
+  void set_blocks_used(int64_t start_block, int64_t num_blocks) override;
 
-  void free_blocks(int64_t start_block, int64_t num_blocks);
-  void dump_state(int& count);
+  void free_blocks(int64_t start_block, int64_t num_blocks) override;
+  void dump_state(int& count) override;
 };
 
 class BitMapAreaIN: public BitMapArea{
@@ -411,24 +411,24 @@ protected:
   std::mutex m_blocks_lock;
   BitMapAreaList *m_child_list;
 
-  virtual bool is_allocated(int64_t start_block, int64_t num_blocks);
-  virtual bool is_exhausted();
+  bool is_allocated(int64_t start_block, int64_t num_blocks) override;
+  bool is_exhausted() override;
 
-  bool child_check_n_lock(BitMapArea *child, int64_t required, bool lock) {
+  bool child_check_n_lock(BitMapArea *child, int64_t required, bool lock) override {
     ceph_abort();
     return false;
   }
 
-  virtual bool child_check_n_lock(BitMapArea *child, int64_t required);
-  virtual void child_unlock(BitMapArea *child);
+  bool child_check_n_lock(BitMapArea *child, int64_t required) override;
+  void child_unlock(BitMapArea *child) override;
 
-  virtual void lock_excl() {
+  void lock_excl() override {
     return;
   }
-  virtual void lock_shared() {
+  void lock_shared() override {
     return;
   }
-  virtual void unlock() {
+  void unlock() override {
     return;
   }
 
@@ -447,30 +447,30 @@ public:
   BitMapAreaIN(CephContext* cct, int64_t zone_num, int64_t total_blocks,
               bool def);
 
-  virtual ~BitMapAreaIN();
-  void shutdown();
-  virtual int64_t sub_used_blocks(int64_t num_blocks);
-  virtual int64_t add_used_blocks(int64_t num_blocks);
-  virtual bool reserve_blocks(int64_t num_blocks);
-  virtual void unreserve(int64_t num_blocks, int64_t allocated);
-  virtual int64_t get_reserved_blocks();
-  virtual int64_t get_used_blocks();
+  ~BitMapAreaIN() override;
+  void shutdown() override;
+  int64_t sub_used_blocks(int64_t num_blocks) override;
+  int64_t add_used_blocks(int64_t num_blocks) override;
+  bool reserve_blocks(int64_t num_blocks) override;
+  void unreserve(int64_t num_blocks, int64_t allocated) override;
+  int64_t get_reserved_blocks() override;
+  int64_t get_used_blocks() override;
   virtual int64_t get_used_blocks_adj();
-  virtual int64_t size() {
+  int64_t size() override {
     return m_total_blocks;
   }
   using BitMapArea::alloc_blocks_dis; //non-wait version
 
   virtual int64_t alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc, int64_t hint,
-        int64_t blk_off, ExtentList *block_list);  
-  virtual int64_t alloc_blocks_dis(int64_t num_blocks, int64_t min_alloc, int64_t hint,
-        int64_t blk_off, ExtentList *block_list);  
+                                       int64_t blk_off, ExtentList *block_list);  
+  int64_t alloc_blocks_dis(int64_t num_blocks, int64_t min_alloc, int64_t hint,
+                           int64_t blk_off, ExtentList *block_list) override;  
   virtual void set_blocks_used_int(int64_t start_block, int64_t num_blocks);
-  virtual void set_blocks_used(int64_t start_block, int64_t num_blocks);
+  void set_blocks_used(int64_t start_block, int64_t num_blocks) override;
 
   virtual void free_blocks_int(int64_t start_block, int64_t num_blocks);
-  virtual void free_blocks(int64_t start_block, int64_t num_blocks);
-  void dump_state(int& count);
+  void free_blocks(int64_t start_block, int64_t num_blocks) override;
+  void dump_state(int& count) override;
 };
 
 class BitMapAreaLeaf: public BitMapAreaIN{
@@ -489,7 +489,7 @@ public:
                 bool def);
 
   using BitMapAreaIN::child_check_n_lock;
-  bool child_check_n_lock(BitMapArea *child, int64_t required) {
+  bool child_check_n_lock(BitMapArea *child, int64_t required) override {
     ceph_abort();
     return false;
   }
@@ -498,10 +498,10 @@ public:
 
   int64_t alloc_blocks_int(int64_t num_blocks, int64_t hint, int64_t *start_block);
   int64_t alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc, int64_t hint,
-        int64_t blk_off, ExtentList *block_list);  
-  void free_blocks_int(int64_t start_block, int64_t num_blocks);
+        int64_t blk_off, ExtentList *block_list) override;  
+  void free_blocks_int(int64_t start_block, int64_t num_blocks) override;
 
-  virtual ~BitMapAreaLeaf();
+  ~BitMapAreaLeaf() override;
 };
 
 
@@ -524,16 +524,16 @@ private:
   }
 
   using BitMapArea::child_check_n_lock;
-  bool child_check_n_lock(BitMapArea *child, int64_t required);
-  virtual void child_unlock(BitMapArea *child);
+  bool child_check_n_lock(BitMapArea *child, int64_t required) override;
+  void child_unlock(BitMapArea *child) override;
 
   void serial_lock();
   bool try_serial_lock();
   void serial_unlock();
-  void lock_excl();
-  void lock_shared();
+  void lock_excl() override;
+  void lock_shared() override;
   bool try_lock();
-  void unlock();
+  void unlock() override;
 
   bool check_input(int64_t num_blocks);
   bool check_input_dis(int64_t num_blocks);
@@ -542,7 +542,7 @@ private:
   int64_t alloc_blocks_dis_work(int64_t num_blocks, int64_t min_alloc, int64_t hint, ExtentList *block_list, bool reserved);
 
   int64_t alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc, 
-           int64_t hint, int64_t area_blk_off, ExtentList *block_list);
+           int64_t hint, int64_t area_blk_off, ExtentList *block_list) override;
 
 public:
   MEMPOOL_CLASS_HELPERS();
@@ -553,12 +553,12 @@ public:
               bmap_alloc_mode_t mode, bool def);
   BitAllocator(CephContext* cct, int64_t total_blocks, int64_t zone_size_block,
                bmap_alloc_mode_t mode, bool def, bool stats_on);
-  ~BitAllocator();
-  void shutdown();
+  ~BitAllocator() override;
+  void shutdown() override;
   using BitMapAreaIN::alloc_blocks_dis; //Wait version
 
-  void free_blocks(int64_t start_block, int64_t num_blocks);
-  void set_blocks_used(int64_t start_block, int64_t num_blocks);
+  void free_blocks(int64_t start_block, int64_t num_blocks) override;
+  void set_blocks_used(int64_t start_block, int64_t num_blocks) override;
   void unreserve_blocks(int64_t blocks);
 
   int64_t alloc_blocks_dis_res(int64_t num_blocks, int64_t min_alloc, int64_t hint, ExtentList *block_list);
@@ -569,7 +569,7 @@ public:
   int64_t total_blocks() const {
     return m_total_blocks - m_extra_blocks;
   }
-  int64_t get_used_blocks() {
+  int64_t get_used_blocks() override {
     return (BitMapAreaIN::get_used_blocks_adj() - m_extra_blocks);
   }
 
index 354dc17af3bee3f4f32f81471375084ca3b3ce12..17bb2560394b4181518f46ca47787793524a6971 100644 (file)
@@ -26,7 +26,7 @@ class BitMapAllocator : public Allocator {
 
 public:
   BitMapAllocator(CephContext* cct, int64_t device_size, int64_t block_size);
-  ~BitMapAllocator();
+  ~BitMapAllocator() override;
 
   int reserve(uint64_t need) override;
   void unreserve(uint64_t unused) override;
index d8808c00d12de05e9dca3217cfca20e999220238..bf2dcf518e12399041f0c6950d4c303d42b0d9cb 100644 (file)
@@ -75,7 +75,7 @@ public:
        num_writers(0),
        num_reading(0)
       {}
-    ~File() {
+    ~File() override {
       assert(num_readers.load() == 0);
       assert(num_writers.load() == 0);
       assert(num_reading.load() == 0);
index ff5aaa6f1112c3c4ad31cdde8650ecb7c97f1e80..3fcccc861dd3b50760d26b99ac44aa0972c03954 100644 (file)
@@ -30,7 +30,7 @@ class BlueRocksSequentialFile : public rocksdb::SequentialFile {
   BlueFS::FileReader *h;
  public:
   BlueRocksSequentialFile(BlueFS *fs, BlueFS::FileReader *h) : fs(fs), h(h) {}
-  ~BlueRocksSequentialFile() {
+  ~BlueRocksSequentialFile() override {
     delete h;
   }
 
@@ -76,7 +76,7 @@ class BlueRocksRandomAccessFile : public rocksdb::RandomAccessFile {
   BlueFS::FileReader *h;
  public:
   BlueRocksRandomAccessFile(BlueFS *fs, BlueFS::FileReader *h) : fs(fs), h(h) {}
-  ~BlueRocksRandomAccessFile() {
+  ~BlueRocksRandomAccessFile() override {
     delete h;
   }
 
@@ -154,7 +154,7 @@ class BlueRocksWritableFile : public rocksdb::WritableFile {
   BlueFS::FileWriter *h;
  public:
   BlueRocksWritableFile(BlueFS *fs, BlueFS::FileWriter *h) : fs(fs), h(h) {}
-  ~BlueRocksWritableFile() {
+  ~BlueRocksWritableFile() override {
     fs->close_writer(h);
   }
 
@@ -306,7 +306,7 @@ class BlueRocksFileLock : public rocksdb::FileLock {
   BlueFS *fs;
   BlueFS::FileLock *lock;
   BlueRocksFileLock(BlueFS *fs, BlueFS::FileLock *l) : fs(fs), lock(l) { }
-  ~BlueRocksFileLock() {
+  ~BlueRocksFileLock() override {
   }
 };
 
index 463cbf460dcb4675413b7bbcde0abe20efbe4b02..555c6964f5c54a4c2a4b296b241122a67220d7bb 100644 (file)
@@ -32,7 +32,7 @@ public:
   rocksdb::Status NewSequentialFile(
     const std::string& fname,
     std::unique_ptr<rocksdb::SequentialFile>* result,
-    const rocksdb::EnvOptions& options);
+    const rocksdb::EnvOptions& options) override;
 
   // Create a brand new random access read-only file with the
   // specified name.  On success, stores a pointer to the new file in
@@ -44,7 +44,7 @@ public:
   rocksdb::Status NewRandomAccessFile(
     const std::string& fname,
     std::unique_ptr<rocksdb::RandomAccessFile>* result,
-    const rocksdb::EnvOptions& options);
+    const rocksdb::EnvOptions& options) override;
 
   // Create an object that writes to a new file with the specified
   // name.  Deletes any existing file with the same name and creates a
@@ -56,14 +56,14 @@ public:
   rocksdb::Status NewWritableFile(
     const std::string& fname,
     std::unique_ptr<rocksdb::WritableFile>* result,
-    const rocksdb::EnvOptions& options);
+    const rocksdb::EnvOptions& options) override;
 
   // Reuse an existing file by renaming it and opening it as writable.
   rocksdb::Status ReuseWritableFile(
     const std::string& fname,
     const std::string& old_fname,
     std::unique_ptr<rocksdb::WritableFile>* result,
-    const rocksdb::EnvOptions& options);
+    const rocksdb::EnvOptions& options) override;
 
   // Create an object that represents a directory. Will fail if directory
   // doesn't exist. If the directory exists, it will open the directory
@@ -74,45 +74,45 @@ public:
   // returns non-OK.
   rocksdb::Status NewDirectory(
     const std::string& name,
-    std::unique_ptr<rocksdb::Directory>* result);
+    std::unique_ptr<rocksdb::Directory>* result) override;
 
   // Returns OK if the named file exists.
   //         NotFound if the named file does not exist,
   //                  the calling process does not have permission to determine
   //                  whether this file exists, or if the path is invalid.
   //         IOError if an IO Error was encountered
-  rocksdb::Status FileExists(const std::string& fname);
+  rocksdb::Status FileExists(const std::string& fname) override;
 
   // Store in *result the names of the children of the specified directory.
   // The names are relative to "dir".
   // Original contents of *results are dropped.
   rocksdb::Status GetChildren(const std::string& dir,
-                             std::vector<std::string>* result);
+                             std::vector<std::string>* result) override;
 
   // Delete the named file.
-  rocksdb::Status DeleteFile(const std::string& fname);
+  rocksdb::Status DeleteFile(const std::string& fname) override;
 
   // Create the specified directory. Returns error if directory exists.
-  rocksdb::Status CreateDir(const std::string& dirname);
+  rocksdb::Status CreateDir(const std::string& dirname) override;
 
   // Create directory if missing. Return Ok if it exists, or successful in
   // Creating.
-  rocksdb::Status CreateDirIfMissing(const std::string& dirname);
+  rocksdb::Status CreateDirIfMissing(const std::string& dirname) override;
 
   // Delete the specified directory.
-  rocksdb::Status DeleteDir(const std::string& dirname);
+  rocksdb::Status DeleteDir(const std::string& dirname) override;
 
   // Store the size of fname in *file_size.
-  rocksdb::Status GetFileSize(const std::string& fname, uint64_t* file_size);
+  rocksdb::Status GetFileSize(const std::string& fname, uint64_t* file_size) override;
 
   // Store the last modification time of fname in *file_mtime.
   rocksdb::Status GetFileModificationTime(const std::string& fname,
-                                         uint64_t* file_mtime);
+                                         uint64_t* file_mtime) override;
   // Rename file src to target.
   rocksdb::Status RenameFile(const std::string& src,
-                            const std::string& target);
+                            const std::string& target) override;
   // Hard Link file src to target.
-  rocksdb::Status LinkFile(const std::string& src, const std::string& target);
+  rocksdb::Status LinkFile(const std::string& src, const std::string& target) override;
 
   // Lock the specified file.  Used to prevent concurrent access to
   // the same db by multiple processes.  On failure, stores nullptr in
@@ -128,27 +128,27 @@ public:
   // to go away.
   //
   // May create the named file if it does not already exist.
-  rocksdb::Status LockFile(const std::string& fname, rocksdb::FileLock** lock);
+  rocksdb::Status LockFile(const std::string& fname, rocksdb::FileLock** lock) override;
 
   // Release the lock acquired by a previous successful call to LockFile.
   // REQUIRES: lock was returned by a successful LockFile() call
   // REQUIRES: lock has not already been unlocked.
-  rocksdb::Status UnlockFile(rocksdb::FileLock* lock);
+  rocksdb::Status UnlockFile(rocksdb::FileLock* lock) override;
 
   // *path is set to a temporary directory that can be used for testing. It may
   // or may not have just been created. The directory may or may not differ
   // between runs of the same process, but subsequent calls will return the
   // same directory.
-  rocksdb::Status GetTestDirectory(std::string* path);
+  rocksdb::Status GetTestDirectory(std::string* path) override;
 
   // Create and return a log file for storing informational messages.
   rocksdb::Status NewLogger(
     const std::string& fname,
-    std::shared_ptr<rocksdb::Logger>* result);
+    std::shared_ptr<rocksdb::Logger>* result) override;
 
   // Get full directory name for this db.
   rocksdb::Status GetAbsolutePath(const std::string& db_path,
-      std::string* output_path);
+      std::string* output_path) override;
 
   explicit BlueRocksEnv(BlueFS *f);
 private:
index 04cb5536e5f93695bc8365928dc3e477f0bc29aa..cfed361d566c76d2a3dcd1420e00f1af5fecf43b 100644 (file)
@@ -115,8 +115,8 @@ class BlueStore : public ObjectStore,
   // types
 public:
   // config observer
-  virtual const char** get_tracked_conf_keys() const override;
-  virtual void handle_conf_change(const struct md_config_t *conf,
+  const char** get_tracked_conf_keys() const override;
+  void handle_conf_change(const struct md_config_t *conf,
                                   const std::set<std::string> &changed) override;
 
   void _set_csum();
@@ -1319,14 +1319,14 @@ public:
     string head, tail;
   public:
     OmapIteratorImpl(CollectionRef c, OnodeRef o, KeyValueDB::Iterator it);
-    int seek_to_first();
-    int upper_bound(const string &after);
-    int lower_bound(const string &to);
-    bool valid();
-    int next(bool validate=true);
-    string key();
-    bufferlist value();
-    int status() {
+    int seek_to_first() override;
+    int upper_bound(const string &after) override;
+    int lower_bound(const string &to) override;
+    bool valid() override;
+    int next(bool validate=true) override;
+    string key() override;
+    bufferlist value() override;
+    int status() override {
       return 0;
     }
   };
@@ -1558,7 +1558,7 @@ public:
        parent(NULL), store(store) {
       store->register_osr(this);
     }
-    ~OpSequencer() {
+    ~OpSequencer() override {
       assert(q.empty());
       _unregister();
     }
@@ -1647,7 +1647,7 @@ public:
   struct KVSyncThread : public Thread {
     BlueStore *store;
     explicit KVSyncThread(BlueStore *s) : store(s) {}
-    void *entry() {
+    void *entry() override {
       store->_kv_sync_thread();
       return NULL;
     }
@@ -1780,7 +1780,7 @@ private:
     explicit MempoolThread(BlueStore *s)
       : store(s),
        lock("BlueStore::MempoolThread::lock") {}
-    void *entry();
+    void *entry() override;
     void init() {
       assert(stop == false);
       create("bstore_mempool");
@@ -1942,7 +1942,7 @@ private:
 public:
   BlueStore(CephContext *cct, const string& path);
   BlueStore(CephContext *cct, const string& path, uint64_t min_alloc_size); // Ctor for UT only
-  ~BlueStore();
+  ~BlueStore() override;
 
   string get_type() override {
     return "bluestore";
@@ -2175,7 +2175,7 @@ public:
     perf_tracker.update_from_perfcounters(*logger);
     return perf_tracker.get_cur_stats();
   }
-  const PerfCounters* get_perf_counters() const {
+  const PerfCounters* get_perf_counters() const override {
     return logger;
   }
 
index 77ca32672eac7ac14c1d831882c4289ef6f04284..e1d145fef616829e813fa1cad723dca8ba006222 100644 (file)
@@ -44,7 +44,7 @@ class KernelDevice : public BlockDevice {
   struct AioCompletionThread : public Thread {
     KernelDevice *bdev;
     explicit AioCompletionThread(KernelDevice *b) : bdev(b) {}
-    void *entry() {
+    void *entry() override {
       bdev->_aio_thread();
       return NULL;
     }
index 6cd93eca73ec20bee444329dfbcee991789819a3..445e8a6bc8a1c4e3b32d4d4211d36726bd807e69 100644 (file)
@@ -26,7 +26,7 @@ class StupidAllocator : public Allocator {
 
 public:
   StupidAllocator(CephContext* cct);
-  ~StupidAllocator();
+  ~StupidAllocator() override;
 
   int reserve(uint64_t need) override;
   void unreserve(uint64_t unused) override;
index 2933eb1949cac6af18d6b2c57bcd7b309918fdf5..0794be2d364d61f99fa4c2141999d434dd57a42b 100644 (file)
@@ -30,20 +30,20 @@ private:
   bool m_filestore_btrfs_snap;
 public:
   explicit BtrfsFileStoreBackend(FileStore *fs);
-  ~BtrfsFileStoreBackend() {}
-  const char *get_name() {
+  ~BtrfsFileStoreBackend() override {}
+  const char *get_name() override {
     return "btrfs";
   }
-  int detect_features();
-  bool can_checkpoint();
-  int create_current();
-  int list_checkpoints(list<string>& ls);
-  int create_checkpoint(const string& name, uint64_t *cid);
-  int sync_checkpoint(uint64_t cid);
-  int rollback_to(const string& name);
-  int destroy_checkpoint(const string& name);
-  int syncfs();
-  int clone_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff);
+  int detect_features() override;
+  bool can_checkpoint() override;
+  int create_current() override;
+  int list_checkpoints(list<string>& ls) override;
+  int create_checkpoint(const string& name, uint64_t *cid) override;
+  int sync_checkpoint(uint64_t cid) override;
+  int rollback_to(const string& name) override;
+  int destroy_checkpoint(const string& name) override;
+  int syncfs() override;
+  int clone_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff) override;
 };
 #endif
 #endif
index 2fb411d753cfe1cf98bec7199bb08d5489733415..f65e2b600f38ffe68a0a5ff88982d22e8b8edc51 100644 (file)
@@ -125,86 +125,86 @@ public:
     const ghobject_t &oid,
     const map<string, bufferlist> &set,
     const SequencerPosition *spos=0
-    );
+    ) override;
 
   int set_header(
     const ghobject_t &oid,
     const bufferlist &bl,
     const SequencerPosition *spos=0
-    );
+    ) override;
 
   int get_header(
     const ghobject_t &oid,
     bufferlist *bl
-    );
+    ) override;
 
   int clear(
     const ghobject_t &oid,
     const SequencerPosition *spos=0
-    );
+    ) override;
 
   int clear_keys_header(
     const ghobject_t &oid,
     const SequencerPosition *spos=0
-    );
+    ) override;
 
   int rm_keys(
     const ghobject_t &oid,
     const set<string> &to_clear,
     const SequencerPosition *spos=0
-    );
+    ) override;
 
   int get(
     const ghobject_t &oid,
     bufferlist *header,
     map<string, bufferlist> *out
-    );
+    ) override;
 
   int get_keys(
     const ghobject_t &oid,
     set<string> *keys
-    );
+    ) override;
 
   int get_values(
     const ghobject_t &oid,
     const set<string> &keys,
     map<string, bufferlist> *out
-    );
+    ) override;
 
   int check_keys(
     const ghobject_t &oid,
     const set<string> &keys,
     set<string> *out
-    );
+    ) override;
 
   int get_xattrs(
     const ghobject_t &oid,
     const set<string> &to_get,
     map<string, bufferlist> *out
-    );
+    ) override;
 
   int get_all_xattrs(
     const ghobject_t &oid,
     set<string> *out
-    );
+    ) override;
 
   int set_xattrs(
     const ghobject_t &oid,
     const map<string, bufferlist> &to_set,
     const SequencerPosition *spos=0
-    );
+    ) override;
 
   int remove_xattrs(
     const ghobject_t &oid,
     const set<string> &to_remove,
     const SequencerPosition *spos=0
-    );
+    ) override;
 
   int clone(
     const ghobject_t &oid,
     const ghobject_t &target,
     const SequencerPosition *spos=0
-    );
+    ) override;
 
   /// Read initial state from backing store
   int init(bool upgrade = false);
@@ -213,16 +213,16 @@ public:
   int upgrade_to_v2();
 
   /// Consistency check, debug, there must be no parallel writes
-  bool check(std::ostream &out);
+  bool check(std::ostream &out) override;
 
   /// Ensure that all previous operations are durable
-  int sync(const ghobject_t *oid=0, const SequencerPosition *spos=0);
+  int sync(const ghobject_t *oid=0, const SequencerPosition *spos=0) override;
 
   /// Util, list all objects, there must be no other concurrent access
   int list_objects(vector<ghobject_t> *objs ///< [out] objects
     );
 
-  ObjectMapIterator get_iterator(const ghobject_t &oid);
+  ObjectMapIterator get_iterator(const ghobject_t &oid) override;
 
   static const string USER_PREFIX;
   static const string XATTR_PREFIX;
@@ -346,15 +346,15 @@ private:
 
   class EmptyIteratorImpl : public ObjectMapIteratorImpl {
   public:
-    int seek_to_first() { return 0; }
+    int seek_to_first() override { return 0; }
     int seek_to_last() { return 0; }
-    int upper_bound(const string &after) { return 0; }
-    int lower_bound(const string &to) { return 0; }
-    bool valid() { return false; }
-    int next(bool validate=true) { ceph_abort(); return 0; }
-    string key() { ceph_abort(); return ""; }
-    bufferlist value() { ceph_abort(); return bufferlist(); }
-    int status() { return 0; }
+    int upper_bound(const string &after) override { return 0; }
+    int lower_bound(const string &to) override { return 0; }
+    bool valid() override { return false; }
+    int next(bool validate=true) override { ceph_abort(); return 0; }
+    string key() override { ceph_abort(); return ""; }
+    bufferlist value() override { ceph_abort(); return bufferlist(); }
+    int status() override { return 0; }
   };
 
 
@@ -384,15 +384,15 @@ private:
 
     DBObjectMapIteratorImpl(DBObjectMap *map, Header header) :
       map(map), hlock(map), header(header), r(0), ready(false), invalid(true) {}
-    int seek_to_first();
+    int seek_to_first() override;
     int seek_to_last();
-    int upper_bound(const string &after);
-    int lower_bound(const string &to);
-    bool valid();
-    int next(bool validate=true);
-    string key();
-    bufferlist value();
-    int status();
+    int upper_bound(const string &after) override;
+    int lower_bound(const string &to) override;
+    bool valid() override;
+    int next(bool validate=true) override;
+    string key() override;
+    bufferlist value() override;
+    int status() override;
 
     bool on_parent() {
       return cur_iter == parent_iter;
index 4fdb8409db21a1466503e32bb8a7dec73eb3fae3..8e037ac78a12604dc6cfb4c6692d63d85ee789ff 100644 (file)
@@ -66,7 +66,7 @@ public:
           MAX((cct->_conf->filestore_fd_cache_size / registry_shards), 1));
     }
   }
-  ~FDCache() {
+  ~FDCache() override {
     cct->_conf->remove_observer(this);
     delete[] registry;
   }
@@ -89,7 +89,7 @@ public:
   }
 
   /// md_config_obs_t
-  const char** get_tracked_conf_keys() const {
+  const char** get_tracked_conf_keys() const override {
     static const char* KEYS[] = {
       "filestore_fd_cache_size",
       NULL
@@ -97,7 +97,7 @@ public:
     return KEYS;
   }
   void handle_conf_change(const md_config_t *conf,
-                         const std::set<std::string> &changed) {
+                         const std::set<std::string> &changed) override {
     if (changed.count("filestore_fd_cache_size")) {
       for (int i = 0; i < registry_shards; ++i)
         registry[i].set_size(
index 095d4883b17a1da650504db6ddf78fe2440a16c6..67c4f03fd2086b0c58eb4d2e46fc23befd27ca04 100644 (file)
@@ -102,11 +102,11 @@ public:
     completions.pop_front();
   }
 
-  int prepare_entry(vector<ObjectStore::Transaction>& tls, bufferlist* tbl);
+  int prepare_entry(vector<ObjectStore::Transaction>& tls, bufferlist* tbl) override;
 
   void submit_entry(uint64_t seq, bufferlist& bl, uint32_t orig_len,
                    Context *oncommit,
-                   TrackedOpRef osd_op = TrackedOpRef());
+                   TrackedOpRef osd_op = TrackedOpRef()) override;
   /// End protected by finisher_lock
 
   /*
@@ -366,7 +366,7 @@ private:
     FileJournal *journal;
   public:
     explicit Writer(FileJournal *fj) : journal(fj) {}
-    void *entry() {
+    void *entry() override {
       journal->write_thread_entry();
       return 0;
     }
@@ -376,7 +376,7 @@ private:
     FileJournal *journal;
   public:
     explicit WriteFinisher(FileJournal *fj) : journal(fj) {}
-    void *entry() {
+    void *entry() override {
       journal->write_finish_thread_entry();
       return 0;
     }
@@ -435,35 +435,35 @@ private:
 
       cct->_conf->add_observer(this);
   }
-  ~FileJournal() {
+  ~FileJournal() override {
     assert(fd == -1);
     delete[] zero_buf;
     cct->_conf->remove_observer(this);
   }
 
-  int check();
-  int create();
-  int open(uint64_t fs_op_seq);
-  void close();
+  int check() override;
+  int create() override;
+  int open(uint64_t fs_op_seq) override;
+  void close() override;
   int peek_fsid(uuid_d& fsid);
 
-  int dump(ostream& out);
+  int dump(ostream& out) override;
   int simple_dump(ostream& out);
   int _fdump(Formatter &f, bool simple);
 
-  void flush();
+  void flush() override;
 
-  void reserve_throttle_and_backoff(uint64_t count);
+  void reserve_throttle_and_backoff(uint64_t count) override;
 
-  bool is_writeable() {
+  bool is_writeable() override {
     return read_pos == 0;
   }
-  int make_writeable();
+  int make_writeable() override;
 
   // writes
-  void commit_start(uint64_t seq);
-  void committed_thru(uint64_t seq);
-  bool should_commit_now() {
+  void commit_start(uint64_t seq) override;
+  void committed_thru(uint64_t seq) override;
+  bool should_commit_now() override {
     return full_state != FULL_NOTFULL && !write_stop;
   }
 
@@ -513,7 +513,7 @@ private:
 
   bool read_entry(
     bufferlist &bl,
-    uint64_t &last_seq) {
+    uint64_t &last_seq) override {
     return read_entry(bl, last_seq, 0);
   }
 
index a81d7508bc9f019ac7e7a5014d3ef44aa56f6e67..a67c79f12a8a3450de2f888438e946620d9be256 100644 (file)
@@ -137,11 +137,11 @@ public:
 
     void update_from_perfcounters(PerfCounters &logger);
   } perf_tracker;
-  objectstore_perf_stat_t get_cur_stats() {
+  objectstore_perf_stat_t get_cur_stats() override {
     perf_tracker.update_from_perfcounters(*logger);
     return perf_tracker.get_cur_stats();
   }
-  const PerfCounters* get_perf_counters() const {
+  const PerfCounters* get_perf_counters() const override {
     return logger;
   }
 
@@ -202,7 +202,7 @@ private:
   struct SyncThread : public Thread {
     FileStore *fs;
     explicit SyncThread(FileStore *f) : fs(f) {}
-    void *entry() {
+    void *entry() override {
       fs->sync_entry();
       return 0;
     }
@@ -309,7 +309,7 @@ private:
       return o;
     }
 
-    void flush() {
+    void flush() override {
       Mutex::Locker l(qlock);
 
       while (cct->_conf->filestore_blackhole)
@@ -330,7 +330,7 @@ private:
          cond.Wait(qlock);
       }
     }
-    bool flush_commit(Context *c) {
+    bool flush_commit(Context *c) override {
       Mutex::Locker l(qlock);
       uint64_t seq = 0;
       if (_get_max_uncompleted(&seq)) {
@@ -347,7 +347,7 @@ private:
        parent(0),
        apply_lock("FileStore::OpSequencer::apply_lock", false, false),
         id(i) {}
-    ~OpSequencer() {
+    ~OpSequencer() override {
       assert(q.empty());
     }
 
@@ -376,17 +376,17 @@ private:
     OpWQ(FileStore *fs, time_t timeout, time_t suicide_timeout, ThreadPool *tp)
       : ThreadPool::WorkQueue<OpSequencer>("FileStore::OpWQ", timeout, suicide_timeout, tp), store(fs) {}
 
-    bool _enqueue(OpSequencer *osr) {
+    bool _enqueue(OpSequencer *osr) override {
       store->op_queue.push_back(osr);
       return true;
     }
-    void _dequeue(OpSequencer *o) {
+    void _dequeue(OpSequencer *o) override {
       ceph_abort();
     }
-    bool _empty() {
+    bool _empty() override {
       return store->op_queue.empty();
     }
-    OpSequencer *_dequeue() {
+    OpSequencer *_dequeue() override {
       if (store->op_queue.empty())
        return NULL;
       OpSequencer *osr = store->op_queue.front();
@@ -396,10 +396,10 @@ private:
     void _process(OpSequencer *osr, ThreadPool::TPHandle &handle) override {
       store->_do_op(osr, handle);
     }
-    void _process_finish(OpSequencer *osr) {
+    void _process_finish(OpSequencer *osr) override {
       store->_finish_op(osr);
     }
-    void _clear() {
+    void _clear() override {
       assert(store->op_queue.empty());
     }
   } op_wq;
@@ -440,37 +440,37 @@ public:
   FileStore(CephContext* cct, const std::string &base, const std::string &jdev,
            osflagbits_t flags = 0,
     const char *internal_name = "filestore", bool update_to=false);
-  ~FileStore();
+  ~FileStore() override;
 
-  string get_type() {
+  string get_type() override {
     return "filestore";
   }
 
   int _detect_fs();
   int _sanity_check_fs();
 
-  bool test_mount_in_use();
+  bool test_mount_in_use() override;
   int read_op_seq(uint64_t *seq);
   int write_op_seq(int, uint64_t seq);
-  int mount();
-  int umount();
+  int mount() override;
+  int umount() override;
 
   int validate_hobject_key(const hobject_t &obj) const override;
 
-  unsigned get_max_attr_name_length() {
+  unsigned get_max_attr_name_length() override {
     // xattr limit is 128; leave room for our prefixes (user.ceph._),
     // some margin, and cap at 100
     return 100;
   }
-  int mkfs();
-  int mkjournal();
-  bool wants_journal() {
+  int mkfs() override;
+  int mkjournal() override;
+  bool wants_journal() override {
     return true;
   }
-  bool allows_journal() {
+  bool allows_journal() override {
     return true;
   }
-  bool needs_journal() {
+  bool needs_journal() override {
     return false;
   }
   void dump_perf_counters(Formatter *f) override {
@@ -482,20 +482,20 @@ public:
   int write_version_stamp();
   int version_stamp_is_valid(uint32_t *version);
   int update_version_stamp();
-  int upgrade();
+  int upgrade() override;
 
-  bool can_sort_nibblewise() {
+  bool can_sort_nibblewise() override {
     return true;    // i support legacy sort order
   }
 
-  void collect_metadata(map<string,string> *pm);
+  void collect_metadata(map<string,string> *pm) override;
 
   int statfs(struct store_statfs_t *buf) override;
 
   int _do_transactions(
     vector<Transaction> &tls, uint64_t op_seq,
     ThreadPool::TPHandle *handle);
-  int do_transactions(vector<Transaction> &tls, uint64_t op_seq) {
+  int do_transactions(vector<Transaction> &tls, uint64_t op_seq) override {
     return _do_transactions(tls, op_seq, 0);
   }
   void _do_transaction(
@@ -504,7 +504,7 @@ public:
 
   int queue_transactions(Sequencer *osr, vector<Transaction>& tls,
                         TrackedOpRef op = TrackedOpRef(),
-                        ThreadPool::TPHandle *handle = NULL);
+                        ThreadPool::TPHandle *handle = NULL) override;
 
   /**
    * set replay guard xattr on given file
@@ -557,17 +557,17 @@ public:
     return 0;
   }
   using ObjectStore::exists;
-  bool exists(const coll_t& cid, const ghobject_t& oid);
+  bool exists(const coll_t& cid, const ghobject_t& oid) override;
   using ObjectStore::stat;
   int stat(
     const coll_t& cid,
     const ghobject_t& oid,
     struct stat *st,
-    bool allow_eio = false);
+    bool allow_eio = false) override;
   using ObjectStore::set_collection_opts;
   int set_collection_opts(
     const coll_t& cid,
-    const pool_opts_t& opts);
+    const pool_opts_t& opts) override;
   using ObjectStore::read;
   int read(
     const coll_t& cid,
@@ -576,13 +576,13 @@ public:
     size_t len,
     bufferlist& bl,
     uint32_t op_flags = 0,
-    bool allow_eio = false);
+    bool allow_eio = false) override;
   int _do_fiemap(int fd, uint64_t offset, size_t len,
                  map<uint64_t, uint64_t> *m);
   int _do_seek_hole_data(int fd, uint64_t offset, size_t len,
                          map<uint64_t, uint64_t> *m);
   using ObjectStore::fiemap;
-  int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl);
+  int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl) override;
 
   int _touch(const coll_t& cid, const ghobject_t& oid);
   int _write(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len,
@@ -612,33 +612,33 @@ public:
   void flush();
   void sync_and_flush();
 
-  int flush_journal();
-  int dump_journal(ostream& out);
+  int flush_journal() override;
+  int dump_journal(ostream& out) override;
 
-  void set_fsid(uuid_d u) {
+  void set_fsid(uuid_d u) override {
     fsid = u;
   }
-  uuid_d get_fsid() { return fsid; }
+  uuid_d get_fsid() override { return fsid; }
   
-  uint64_t estimate_objects_overhead(uint64_t num_objects);
+  uint64_t estimate_objects_overhead(uint64_t num_objects) override;
 
   // DEBUG read error injection, an object is removed from both on delete()
   Mutex read_error_lock;
   set<ghobject_t> data_error_set; // read() will return -EIO
   set<ghobject_t> mdata_error_set; // getattr(),stat() will return -EIO
-  void inject_data_error(const ghobject_t &oid);
-  void inject_mdata_error(const ghobject_t &oid);
+  void inject_data_error(const ghobject_t &oid) override;
+  void inject_mdata_error(const ghobject_t &oid) override;
   void debug_obj_on_delete(const ghobject_t &oid);
   bool debug_data_eio(const ghobject_t &oid);
   bool debug_mdata_eio(const ghobject_t &oid);
 
-  int snapshot(const string& name);
+  int snapshot(const string& name) override;
 
   // 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<string,bufferptr>& aset);
+  int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr &bp) override;
+  int getattrs(const coll_t& cid, const ghobject_t& oid, map<string,bufferptr>& aset) override;
 
   int _setattrs(const coll_t& cid, const ghobject_t& oid, map<string,bufferptr>& aset,
                const SequencerPosition &spos);
@@ -654,33 +654,33 @@ public:
   using ObjectStore::collection_list;
   int collection_list(const coll_t& c,
                      const ghobject_t& start, const ghobject_t& end, int max,
-                     vector<ghobject_t> *ls, ghobject_t *next);
-  int list_collections(vector<coll_t>& ls);
+                     vector<ghobject_t> *ls, ghobject_t *next) override;
+  int list_collections(vector<coll_t>& ls) override;
   int list_collections(vector<coll_t>& ls, bool include_temp);
   int collection_stat(const coll_t& c, struct stat *st);
-  bool collection_exists(const coll_t& c);
-  int collection_empty(const coll_t& c, bool *empty);
+  bool collection_exists(const coll_t& c) override;
+  int collection_empty(const coll_t& c, bool *empty) override;
 
   // omap (see ObjectStore.h for documentation)
   using ObjectStore::omap_get;
   int omap_get(const coll_t& c, const ghobject_t &oid, bufferlist *header,
-              map<string, bufferlist> *out);
+              map<string, bufferlist> *out) override;
   using ObjectStore::omap_get_header;
   int omap_get_header(
     const coll_t& c,
     const ghobject_t &oid,
     bufferlist *out,
-    bool allow_eio = false);
+    bool allow_eio = false) override;
   using ObjectStore::omap_get_keys;
-  int omap_get_keys(const coll_t& c, const ghobject_t &oid, set<string> *keys);
+  int omap_get_keys(const coll_t& c, const ghobject_t &oid, set<string> *keys) override;
   using ObjectStore::omap_get_values;
   int omap_get_values(const coll_t& c, const ghobject_t &oid, const set<string> &keys,
-                     map<string, bufferlist> *out);
+                     map<string, bufferlist> *out) override;
   using ObjectStore::omap_check_keys;
   int omap_check_keys(const coll_t& c, const ghobject_t &oid, const set<string> &keys,
-                     set<string> *out);
+                     set<string> *out) override;
   using ObjectStore::get_omap_iterator;
-  ObjectMap::ObjectMapIterator get_omap_iterator(const coll_t& c, const ghobject_t &oid);
+  ObjectMap::ObjectMapIterator get_omap_iterator(const coll_t& c, const ghobject_t &oid) override;
 
   int _create_collection(const coll_t& c, const SequencerPosition &spos);
   int _destroy_collection(const coll_t& c);
@@ -736,9 +736,9 @@ private:
                               coll_t dest,
                               const SequencerPosition &spos);
 
-  virtual const char** get_tracked_conf_keys() const;
-  virtual void handle_conf_change(const struct md_config_t *conf,
-                         const std::set <std::string> &changed);
+  const char** get_tracked_conf_keys() const override;
+  void handle_conf_change(const struct md_config_t *conf,
+                          const std::set <std::string> &changed) override;
   int set_throttle_params();
   float m_filestore_commit_timeout;
   bool m_filestore_journal_parallel;
index 74b8360419d6a1344e7322a1109067c7478a156c..df5d1acf3076505bfdc0cf68e1f2dab11acf3f5e 100644 (file)
@@ -30,38 +30,38 @@ private:
   bool m_filestore_splice;
 public:
   explicit GenericFileStoreBackend(FileStore *fs);
-  virtual ~GenericFileStoreBackend() {}
+  ~GenericFileStoreBackend() override {}
 
-  virtual const char *get_name() {
+  const char *get_name() override {
     return "generic";
   }
-  virtual int detect_features();
-  virtual int create_current();
-  virtual bool can_checkpoint() { return false; }
-  virtual int list_checkpoints(list<string>& ls) { return 0; }
-  virtual int create_checkpoint(const string& name, uint64_t *cid) { return -EOPNOTSUPP; }
-  virtual int sync_checkpoint(uint64_t id) { return -EOPNOTSUPP; }
-  virtual int rollback_to(const string& name) { return -EOPNOTSUPP; }
-  virtual int destroy_checkpoint(const string& name) { return -EOPNOTSUPP; }
-  virtual int syncfs();
-  virtual bool has_fiemap() { return ioctl_fiemap; }
-  virtual bool has_seek_data_hole() { return seek_data_hole; }
-  virtual int do_fiemap(int fd, off_t start, size_t len, struct fiemap **pfiemap);
-  virtual int clone_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff) {
+  int detect_features() override;
+  int create_current() override;
+  bool can_checkpoint() override { return false; }
+  int list_checkpoints(list<string>& ls) override { return 0; }
+  int create_checkpoint(const string& name, uint64_t *cid) override { return -EOPNOTSUPP; }
+  int sync_checkpoint(uint64_t id) override { return -EOPNOTSUPP; }
+  int rollback_to(const string& name) override { return -EOPNOTSUPP; }
+  int destroy_checkpoint(const string& name) override { return -EOPNOTSUPP; }
+  int syncfs() override;
+  bool has_fiemap() override { return ioctl_fiemap; }
+  bool has_seek_data_hole() override { return seek_data_hole; }
+  int do_fiemap(int fd, off_t start, size_t len, struct fiemap **pfiemap) override;
+  int clone_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff) override {
     return _copy_range(from, to, srcoff, len, dstoff);
   }
-  virtual int set_alloc_hint(int fd, uint64_t hint) { return -EOPNOTSUPP; }
-  virtual bool has_splice() const { return use_splice; }
+  int set_alloc_hint(int fd, uint64_t hint) override { return -EOPNOTSUPP; }
+  bool has_splice() const override { return use_splice; }
 private:
   int _crc_load_or_init(int fd, SloppyCRCMap *cm);
   int _crc_save(int fd, SloppyCRCMap *cm);
 public:
-  virtual int _crc_update_write(int fd, loff_t off, size_t len, const bufferlist& bl);
-  virtual int _crc_update_truncate(int fd, loff_t off);
-  virtual int _crc_update_zero(int fd, loff_t off, size_t len);
-  virtual int _crc_update_clone_range(int srcfd, int destfd,
-                                     loff_t srcoff, size_t len, loff_t dstoff);
-  virtual int _crc_verify_read(int fd, loff_t off, size_t len, const bufferlist& bl,
-                              ostream *out);
+  int _crc_update_write(int fd, loff_t off, size_t len, const bufferlist& bl) override;
+  int _crc_update_truncate(int fd, loff_t off) override;
+  int _crc_update_zero(int fd, loff_t off, size_t len) override;
+  int _crc_update_clone_range(int srcfd, int destfd,
+                                     loff_t srcoff, size_t len, loff_t dstoff) override;
+  int _crc_verify_read(int fd, loff_t off, size_t len, const bufferlist& bl,
+                              ostream *out) override;
 };
 #endif
index 4ffde1d34ae972d4ee143563cba94cc41f1fe07d..f9922bcb5fa77fe0bb4e7834f405df619660b754 100644 (file)
@@ -146,43 +146,43 @@ public:
       split_multiplier(split_multiple) {}
 
   /// @see CollectionIndex
-  uint32_t collection_version() { return index_version; }
+  uint32_t collection_version() override { return index_version; }
 
   /// @see CollectionIndex
-  int cleanup();
+  int cleanup() override;
 
   /// @see CollectionIndex
-  int prep_delete();
+  int prep_delete() override;
 
   /// @see CollectionIndex
   int _split(
     uint32_t match,
     uint32_t bits,
     CollectionIndex* dest
-    );
+    ) override;
 
   /// @see CollectionIndex
-  virtual int apply_layout_settings();
+  int apply_layout_settings() override;
 
 protected:
-  int _init();
+  int _init() override;
 
   int _created(
     const vector<string> &path,
     const ghobject_t &oid,
     const string &mangled_name
-    );
+    ) override;
   int _remove(
     const vector<string> &path,
     const ghobject_t &oid,
     const string &mangled_name
-    );
+    ) override;
   int _lookup(
     const ghobject_t &oid,
     vector<string> *path,
     string *mangled_name,
     int *hardlink
-    );
+    ) override;
 
   /**
    * Pre-hash the collection to create folders according to the expected number
@@ -191,7 +191,7 @@ protected:
   int _pre_hash_collection(
       uint32_t pg_num,
       uint64_t expected_num_objs
-      );
+      ) override;
 
   int _collection_list_partial(
     const ghobject_t &start,
@@ -199,7 +199,7 @@ protected:
     int max_count,
     vector<ghobject_t> *ls,
     ghobject_t *next
-    );
+    ) override;
 private:
   /// Internal recursively remove path and its subdirs
   int _recursive_remove(
index 10b66764dd26caacc41b263e034ac75a9c7c9139..17dc2abd7fc6a0459afd54493cea39ee07a35ba4 100644 (file)
@@ -140,7 +140,7 @@ public:
       apply_manager(cct, journal, finisher),
       replaying(false) {}
 
-  ~JournalingObjectStore() {
+  ~JournalingObjectStore() override {
   }
 };
 
index 6cb3ed76e218bbf8df622e78d7a6e323035a8612..bbab0d097be0e1705aab5dd61c5c58a6be21d3a9 100644 (file)
@@ -150,40 +150,40 @@ public:
    }
   }
 
-  coll_t coll() const { return collection; }
+  coll_t coll() const override { return collection; }
 
   /// Virtual destructor
-  virtual ~LFNIndex() {}
+  ~LFNIndex() override {}
 
   /// @see CollectionIndex
-  int init();
+  int init() override;
 
   /// @see CollectionIndex
-  int cleanup() = 0;
+  int cleanup() override = 0;
 
   /// @see CollectionIndex
   int created(
     const ghobject_t &oid,
     const char *path
-    );
+    ) override;
 
   /// @see CollectionIndex
   int unlink(
     const ghobject_t &oid
-    );
+    ) override;
 
   /// @see CollectionIndex
   int lookup(
     const ghobject_t &oid,
     IndexedPath *path,
     int *hardlink
-    );
+    ) override;
 
   /// @see CollectionIndex;
   int pre_hash_collection(
       uint32_t pg_num,
       uint64_t expected_num_objs
-      );
+      ) override;
 
   /// @see CollectionIndex
   int collection_list_partial(
@@ -192,7 +192,7 @@ public:
     int max_count,
     vector<ghobject_t> *ls,
     ghobject_t *next
-    );
+    ) override;
 
   virtual int _split(
     uint32_t match,                             //< [in] value to match
@@ -205,7 +205,7 @@ public:
     uint32_t match,
     uint32_t bits,
     CollectionIndex* dest
-    ) {
+    ) override {
     WRAP_RETRY(
       r = _split(match, bits, dest);
       goto out;
index 9a3d0a788bfe708cc78d22e861530de10fa38ebf..5c71dacafe1120d1556d9d120ca0716f7d471587 100644 (file)
@@ -147,7 +147,7 @@ private:
 
 public:
   explicit WBThrottle(CephContext *cct);
-  ~WBThrottle();
+  ~WBThrottle() override;
 
   void start();
   void stop();
@@ -177,12 +177,12 @@ public:
   void throttle();
 
   /// md_config_obs_t
-  const char** get_tracked_conf_keys() const;
+  const char** get_tracked_conf_keys() const override;
   void handle_conf_change(const md_config_t *conf,
-                         const std::set<std::string> &changed);
+                         const std::set<std::string> &changed) override;
 
   /// Thread
-  void *entry();
+  void *entry() override;
 };
 
 #endif
index 29f412f934a73374e85ce6d7b459dff6349b428d..e8b81f9a12867540f1e1bdfe05500a934bd9f332 100644 (file)
@@ -25,12 +25,12 @@ private:
   int set_extsize(int fd, unsigned int val);
 public:
   explicit XfsFileStoreBackend(FileStore *fs);
-  ~XfsFileStoreBackend() {}
-  const char *get_name() {
+  ~XfsFileStoreBackend() override {}
+  const char *get_name() override {
     return "xfs";
   }
-  int detect_features();
-  int set_alloc_hint(int fd, uint64_t hint);
+  int detect_features() override;
+  int set_alloc_hint(int fd, uint64_t hint) override;
 };
 
 #endif /* CEPH_XFSFILESTOREBACKEND_H */
index 7262f76961cc1b95e3cbdeb8f6291697f43962d6..f0ea717e3c01e846f7934950b69b7ade6f63fff6 100644 (file)
 # endif
 
 class XFS : public FS {
-  const char *get_name() {
+  const char *get_name() override {
     return "xfs";
   }
-  int set_alloc_hint(int fd, uint64_t hint);
+  int set_alloc_hint(int fd, uint64_t hint) override;
 };
 
 #endif
index cf1eb0b939f9a095a3cba7e4e560430df1b6d2bc..c80deb546797077367ec1c8c6afacb0cc5222eba 100644 (file)
@@ -168,14 +168,14 @@ public:
     string head, tail;
   public:
     OmapIteratorImpl(CollectionRef c, OnodeRef o, KeyValueDB::Iterator it);
-    int seek_to_first();
-    int upper_bound(const string &after);
-    int lower_bound(const string &to);
-    bool valid();
-    int next(bool validate=true);
-    string key();
-    bufferlist value();
-    int status() {
+    int seek_to_first() override;
+    int upper_bound(const string &after) override;
+    int lower_bound(const string &to) override;
+    bool valid() override;
+    int next(bool validate=true) override;
+    string key() override;
+    bufferlist value() override;
+    int status() override {
       return 0;
     }
   };
@@ -272,7 +272,7 @@ public:
       : Sequencer_impl(cct),
        parent(NULL) {
     }
-    ~OpSequencer() {
+    ~OpSequencer() override {
       assert(q.empty());
     }
 
@@ -281,13 +281,13 @@ public:
       q.push_back(*txc);
     }
 
-    void flush() {
+    void flush() override {
       std::unique_lock<std::mutex> l(qlock);
       while (!q.empty())
        qcond.wait(l);
     }
 
-    bool flush_commit(Context *c) {
+    bool flush_commit(Context *c) override {
       std::lock_guard<std::mutex> l(qlock);
       if (q.empty()) {
        return true;
@@ -305,7 +305,7 @@ public:
   struct KVSyncThread : public Thread {
     KStore *store;
     explicit KVSyncThread(KStore *s) : store(s) {}
-    void *entry() {
+    void *entry() override {
       store->_kv_sync_thread();
       return NULL;
     }
@@ -403,22 +403,22 @@ private:
 
 public:
   KStore(CephContext *cct, const string& path);
-  ~KStore();
+  ~KStore() override;
 
-  string get_type() {
+  string get_type() override {
     return "kstore";
   }
 
-  bool needs_journal() { return false; };
-  bool wants_journal() { return false; };
-  bool allows_journal() { return false; };
+  bool needs_journal() override { return false; };
+  bool wants_journal() override { return false; };
+  bool allows_journal() override { return false; };
 
   static int get_block_device_fsid(const string& path, uuid_d *fsid);
 
-  bool test_mount_in_use();
+  bool test_mount_in_use() override;
 
-  int mount();
-  int umount();
+  int mount() override;
+  int umount() override;
   void _sync();
 
   int fsck(bool deep) override;
@@ -427,12 +427,12 @@ public:
   int validate_hobject_key(const hobject_t &obj) const override {
     return 0;
   }
-  unsigned get_max_attr_name_length() {
+  unsigned get_max_attr_name_length() override {
     return 256;  // arbitrary; there is no real limit internally
   }
 
-  int mkfs();
-  int mkjournal() {
+  int mkfs() override;
+  int mkjournal() override {
     return 0;
   }
   void dump_perf_counters(Formatter *f) override {
@@ -444,16 +444,16 @@ public:
   int statfs(struct store_statfs_t *buf) override;
 
   using ObjectStore::exists;
-  bool exists(const coll_t& cid, const ghobject_t& oid);
+  bool exists(const coll_t& cid, const ghobject_t& oid) override;
   using ObjectStore::stat;
   int stat(
     const coll_t& cid,
     const ghobject_t& oid,
     struct stat *st,
-    bool allow_eio = false); // struct stat?
+    bool allow_eio = false) override; // struct stat?
   int set_collection_opts(
     const coll_t& cid,
-    const pool_opts_t& opts);
+    const pool_opts_t& opts) override;
   using ObjectStore::read;
   int read(
     const coll_t& cid,
@@ -462,7 +462,7 @@ public:
     size_t len,
     bufferlist& bl,
     uint32_t op_flags = 0,
-    bool allow_eio = false);
+    bool allow_eio = false) override;
   int _do_read(
     OnodeRef o,
     uint64_t offset,
@@ -471,15 +471,15 @@ public:
     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);
+  int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl) override;
   using ObjectStore::getattr;
-  int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr& value);
+  int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr& value) override;
   using ObjectStore::getattrs;
-  int getattrs(const coll_t& cid, const ghobject_t& oid, map<string,bufferptr>& aset);
+  int getattrs(const coll_t& cid, const ghobject_t& oid, map<string,bufferptr>& aset) override;
 
-  int list_collections(vector<coll_t>& ls);
-  bool collection_exists(const coll_t& c);
-  int collection_empty(const coll_t& c, bool *empty);
+  int list_collections(vector<coll_t>& ls) override;
+  bool collection_exists(const coll_t& c) override;
+  int collection_empty(const coll_t& c, bool *empty) override;
 
   int collection_list(
     const coll_t& cid, const ghobject_t& start, const ghobject_t& end,
@@ -496,7 +496,7 @@ public:
     const ghobject_t &oid,   ///< [in] Object containing omap
     bufferlist *header,      ///< [out] omap header
     map<string, bufferlist> *out /// < [out] Key to value map
-    );
+    ) override;
 
   using ObjectStore::omap_get_header;
   /// Get omap header
@@ -505,7 +505,7 @@ public:
     const ghobject_t &oid,   ///< [in] Object containing omap
     bufferlist *header,      ///< [out] omap header
     bool allow_eio = false ///< [in] don't assert on eio
-    );
+    ) override;
 
   using ObjectStore::omap_get_keys;
   /// Get keys defined on oid
@@ -513,7 +513,7 @@ public:
     const coll_t& cid,              ///< [in] Collection containing oid
     const ghobject_t &oid, ///< [in] Object containing omap
     set<string> *keys      ///< [out] Keys defined on oid
-    );
+    ) override;
 
   using ObjectStore::omap_get_values;
   /// Get key values
@@ -522,7 +522,7 @@ public:
     const ghobject_t &oid,       ///< [in] Object containing omap
     const set<string> &keys,     ///< [in] Keys to get
     map<string, bufferlist> *out ///< [out] Returned keys and values
-    );
+    ) override;
 
   using ObjectStore::omap_check_keys;
   /// Filters keys into out which are defined on oid
@@ -531,18 +531,18 @@ public:
     const ghobject_t &oid,   ///< [in] Object containing omap
     const set<string> &keys, ///< [in] Keys to check
     set<string> *out         ///< [out] Subset of keys defined on oid
-    );
+    ) override;
 
   using ObjectStore::get_omap_iterator;
   ObjectMap::ObjectMapIterator get_omap_iterator(
     const coll_t& cid,              ///< [in] collection
     const ghobject_t &oid  ///< [in] object
-    );
+    ) override;
 
-  void set_fsid(uuid_d u) {
+  void set_fsid(uuid_d u) override {
     fsid = u;
   }
-  uuid_d get_fsid() {
+  uuid_d get_fsid() override {
     return fsid;
   }
 
@@ -550,10 +550,10 @@ public:
     return num_objects * 300; //assuming per-object overhead is 300 bytes
   }
 
-  objectstore_perf_stat_t get_cur_stats() {
+  objectstore_perf_stat_t get_cur_stats() override {
     return objectstore_perf_stat_t();
   }
-  const PerfCounters* get_perf_counters() const {
+  const PerfCounters* get_perf_counters() const override {
     return logger;
   }
 
@@ -562,7 +562,7 @@ public:
     Sequencer *osr,
     vector<Transaction>& tls,
     TrackedOpRef op = TrackedOpRef(),
-    ThreadPool::TPHandle *handle = NULL);
+    ThreadPool::TPHandle *handle = NULL) override;
 
 private:
   // --------------------------------------------------------
index 534c1b9ea7b6155cbc50869e05bd0c98f057f72a..ca1c5004f6ee1d764ef374c5c82a4964894789a3 100644 (file)
@@ -242,7 +242,7 @@ public:
       coll_lock("MemStore::coll_lock"),
       finisher(cct),
       used_bytes(0) {}
-  ~MemStore() { }
+  ~MemStore() override { }
 
   string get_type() override {
     return "memstore";
@@ -290,7 +290,7 @@ public:
           struct stat *st, bool allow_eio = false) override;
   int set_collection_opts(
     const coll_t& cid,
-    const pool_opts_t& opts);
+    const pool_opts_t& opts) override;
   int read(
     const coll_t& cid,
     const ghobject_t& oid,
@@ -388,7 +388,7 @@ public:
 
   objectstore_perf_stat_t get_cur_stats() override;
 
-  const PerfCounters* get_perf_counters() const {
+  const PerfCounters* get_perf_counters() const override {
     return nullptr;
   }
 
index c4b40902cc7c304a7acf7acab695964df56726a3..27bbe24798f31b535646eb9b68430cbafcbbccc3 100644 (file)
@@ -457,7 +457,7 @@ struct SendPushReplies : public Context {
     }
     replies.clear();
   }
-  ~SendPushReplies() {
+  ~SendPushReplies() override {
     for (map<int, MOSDPGPushReply*>::iterator i = replies.begin();
         i != replies.end();
         ++i) {
index bf568816d72f16cf00c07efabf0885ade4139159..96913644fe5eadbb37f1aef6f52ef7677fcde0d2 100644 (file)
@@ -34,12 +34,12 @@ struct ECSubReadReply;
 struct RecoveryMessages;
 class ECBackend : public PGBackend {
 public:
-  RecoveryHandle *open_recovery_op();
+  RecoveryHandle *open_recovery_op() override;
 
   void run_recovery_op(
     RecoveryHandle *h,
     int priority
-    );
+    ) override;
 
   void recover_object(
     const hobject_t &hoid,
@@ -47,14 +47,14 @@ public:
     ObjectContextRef head,
     ObjectContextRef obc,
     RecoveryHandle *h
-    );
+    ) override;
 
   bool handle_message(
     OpRequestRef op
-    );
+    ) override;
   bool can_handle_while_inactive(
     OpRequestRef op
-    );
+    ) override;
   friend struct SubWriteApplied;
   friend struct SubWriteCommitted;
   void sub_write_applied(
@@ -83,14 +83,14 @@ public:
     );
 
   /// @see ReadOp below
-  void check_recovery_sources(const OSDMapRef& osdmap);
+  void check_recovery_sources(const OSDMapRef& osdmap) override;
 
-  void on_change();
-  void clear_recovery_state();
+  void on_change() override;
+  void clear_recovery_state() override;
 
-  void on_flushed();
+  void on_flushed() override;
 
-  void dump_recovery_info(Formatter *f) const;
+  void dump_recovery_info(Formatter *f) const override;
 
   void call_write_ordered(std::function<void(void)> &&cb) override;
 
@@ -109,14 +109,14 @@ public:
     ceph_tid_t tid,
     osd_reqid_t reqid,
     OpRequestRef op
-    );
+    ) override;
 
   int objects_read_sync(
     const hobject_t &hoid,
     uint64_t off,
     uint64_t len,
     uint32_t op_flags,
-    bufferlist *bl);
+    bufferlist *bl) override;
 
   /**
    * Async read mechanism
@@ -173,7 +173,7 @@ public:
     const list<pair<boost::tuple<uint64_t, uint64_t, uint32_t>,
                    pair<bufferlist*, Context*> > > &to_read,
     Context *on_complete,
-    bool fast_read = false);
+    bool fast_read = false) override;
 
   template <typename Func>
   void objects_read_async_no_cache(
@@ -574,7 +574,7 @@ public:
        want.insert(i);
       }
     }
-    bool operator()(const set<pg_shard_t> &_have) const {
+    bool operator()(const set<pg_shard_t> &_have) const override {
       set<int> have;
       for (set<pg_shard_t>::const_iterator i = _have.begin();
           i != _have.end();
@@ -585,7 +585,7 @@ public:
       return ec_impl->minimum_to_decode(want, have, &min) == 0;
     }
   };
-  IsPGRecoverablePredicate *get_is_recoverable_predicate() {
+  IsPGRecoverablePredicate *get_is_recoverable_predicate() override {
     return new ECRecPred(ec_impl);
   }
 
@@ -601,11 +601,11 @@ public:
     ECReadPred(
       pg_shard_t whoami,
       ErasureCodeInterfaceRef ec_impl) : whoami(whoami), rec_pred(ec_impl) {}
-    bool operator()(const set<pg_shard_t> &_have) const {
+    bool operator()(const set<pg_shard_t> &_have) const override {
       return _have.count(whoami) && rec_pred(_have);
     }
   };
-  IsPGReadablePredicate *get_is_readable_predicate() {
+  IsPGReadablePredicate *get_is_readable_predicate() override {
     return new ECReadPred(get_parent()->whoami_shard(), ec_impl);
   }
 
@@ -642,22 +642,22 @@ public:
 
   int objects_get_attrs(
     const hobject_t &hoid,
-    map<string, bufferlist> *out);
+    map<string, bufferlist> *out) override;
 
   void rollback_append(
     const hobject_t &hoid,
     uint64_t old_size,
-    ObjectStore::Transaction *t);
+    ObjectStore::Transaction *t) override;
 
-  bool scrub_supported() { return true; }
-  bool auto_repair_supported() const { return true; }
+  bool scrub_supported() override { return true; }
+  bool auto_repair_supported() const override { return true; }
 
   void be_deep_scrub(
     const hobject_t &obj,
     uint32_t seed,
     ScrubMap::object &o,
-    ThreadPool::TPHandle &handle);
-  uint64_t be_get_ondisk_size(uint64_t logical_size) {
+    ThreadPool::TPHandle &handle) override;
+  uint64_t be_get_ondisk_size(uint64_t logical_size) override {
     return sinfo.logical_to_next_chunk_offset(logical_size);
   }
   void _failed_push(const hobject_t &hoid,
index 13f6c31b6aa947ecaec6ed2d3ee0d4f634d407e6..0f8bc9a60b2e328ee1869fca9f35307948c4a806 100644 (file)
@@ -347,7 +347,7 @@ public:
       : fpp_micro(o.fpp_micro),
        target_size(o.target_size),
        seed(o.seed) {}
-    ~Params() {}
+    ~Params() override {}
 
     double get_fpp() const {
       return (double)fpp_micro / 1000000.0;
index ebcc87ffd4fad6b4aa0c933b9075731b26b665ae..fe05616fc846042943b097789c037875f11a7da9 100644 (file)
@@ -767,7 +767,7 @@ private:
   struct AgentThread : public Thread {
     OSDService *osd;
     explicit AgentThread(OSDService *o) : osd(o) {}
-    void *entry() {
+    void *entry() override {
       osd->agent_entry();
       return NULL;
     }
@@ -1263,9 +1263,9 @@ class OSD : public Dispatcher,
   SafeTimer tick_timer_without_osd_lock;
 public:
   // config observer bits
-  virtual const char** get_tracked_conf_keys() const;
-  virtual void handle_conf_change(const struct md_config_t *conf,
-                                 const std::set <std::string> &changed);
+  const char** get_tracked_conf_keys() const override;
+  void handle_conf_change(const struct md_config_t *conf,
+                          const std::set <std::string> &changed) override;
   void update_log_config();
   void check_config();
 
@@ -1594,7 +1594,7 @@ private:
   struct T_Heartbeat : public Thread {
     OSD *osd;
     explicit T_Heartbeat(OSD *o) : osd(o) {}
-    void *entry() {
+    void *entry() override {
       osd->heartbeat_entry();
       return 0;
     }
@@ -1607,7 +1607,7 @@ public:
     OSD *osd;
     explicit HeartbeatDispatcher(OSD *o) : Dispatcher(o->cct), osd(o) {}
 
-    bool ms_can_fast_dispatch_any() const { return true; }
+    bool ms_can_fast_dispatch_any() const override { return true; }
     bool ms_can_fast_dispatch(const Message *m) const override {
       switch (m->get_type()) {
        case CEPH_MSG_PING:
@@ -1617,22 +1617,22 @@ public:
           return false;
        }
     }
-    void ms_fast_dispatch(Message *m) {
+    void ms_fast_dispatch(Message *m) override {
       osd->heartbeat_dispatch(m);
     }
-    bool ms_dispatch(Message *m) {
+    bool ms_dispatch(Message *m) override {
       return osd->heartbeat_dispatch(m);
     }
-    bool ms_handle_reset(Connection *con) {
+    bool ms_handle_reset(Connection *con) override {
       return osd->heartbeat_reset(con);
     }
-    void ms_handle_remote_reset(Connection *con) {}
-    bool ms_handle_refused(Connection *con) {
+    void ms_handle_remote_reset(Connection *con) override {}
+    bool ms_handle_refused(Connection *con) override {
       return osd->ms_handle_refused(con);
     }
     bool ms_verify_authorizer(Connection *con, int peer_type,
                              int protocol, bufferlist& authorizer_data, bufferlist& authorizer_reply,
-                             bool& isvalid, CryptoKey& session_key) {
+                             bool& isvalid, CryptoKey& session_key) override {
       isvalid = true;
       return true;
     }
@@ -1778,7 +1778,7 @@ private:
        shard_list.push_back(one_shard);
       }
     }
-    ~ShardedOpWQ() {
+    ~ShardedOpWQ() override {
       while (!shard_list.empty()) {
        delete shard_list.back();
        shard_list.pop_back();
@@ -1798,15 +1798,15 @@ private:
     void clear_pg_slots();
 
     /// try to do some work
-    void _process(uint32_t thread_index, heartbeat_handle_d *hb);
+    void _process(uint32_t thread_index, heartbeat_handle_d *hb) override;
 
     /// enqueue a new item
-    void _enqueue(pair <spg_t, PGQueueable> item);
+    void _enqueue(pair <spg_t, PGQueueable> item) override;
 
     /// requeue an old item (at the front of the line)
-    void _enqueue_front(pair <spg_t, PGQueueable> item);
+    void _enqueue_front(pair <spg_t, PGQueueable> item) override;
       
-    void return_waiting_threads() {
+    void return_waiting_threads() override {
       for(uint32_t i = 0; i < num_shards; i++) {
        ShardData* sdata = shard_list[i];
        assert (NULL != sdata); 
@@ -2312,7 +2312,7 @@ protected:
   } remove_wq;
 
  private:
-  bool ms_can_fast_dispatch_any() const { return true; }
+  bool ms_can_fast_dispatch_any() const override { return true; }
   bool ms_can_fast_dispatch(const Message *m) const override {
     switch (m->get_type()) {
     case CEPH_MSG_OSD_OP:
@@ -2338,19 +2338,19 @@ protected:
       return false;
     }
   }
-  void ms_fast_dispatch(Message *m);
-  void ms_fast_preprocess(Message *m);
-  bool ms_dispatch(Message *m);
-  bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new);
+  void ms_fast_dispatch(Message *m) override;
+  void ms_fast_preprocess(Message *m) override;
+  bool ms_dispatch(Message *m) override;
+  bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new) override;
   bool ms_verify_authorizer(Connection *con, int peer_type,
                            int protocol, bufferlist& authorizer, bufferlist& authorizer_reply,
-                           bool& isvalid, CryptoKey& session_key);
-  void ms_handle_connect(Connection *con);
-  void ms_handle_fast_connect(Connection *con);
-  void ms_handle_fast_accept(Connection *con);
-  bool ms_handle_reset(Connection *con);
-  void ms_handle_remote_reset(Connection *con) {}
-  bool ms_handle_refused(Connection *con);
+                           bool& isvalid, CryptoKey& session_key) override;
+  void ms_handle_connect(Connection *con) override;
+  void ms_handle_fast_connect(Connection *con) override;
+  void ms_handle_fast_accept(Connection *con) override;
+  bool ms_handle_reset(Connection *con) override;
+  void ms_handle_remote_reset(Connection *con) override {}
+  bool ms_handle_refused(Connection *con) override;
 
   io_queue get_io_queue() const {
     if (cct->_conf->osd_op_queue == "debug_random") {
@@ -2388,7 +2388,7 @@ protected:
       Messenger *hb_back_server,
       Messenger *osdc_messenger,
       MonClient *mc, const std::string &dev, const std::string &jdev);
-  ~OSD();
+  ~OSD() override;
 
   // static bits
   static int mkfs(CephContext *cct, ObjectStore *store,
index 51a445db5acbe6575dadceef5b5d99c6db369fbe..c325693785eaadafcd247867ffb2487b473c74d2 100644 (file)
@@ -269,10 +269,10 @@ private:
       : Job(osdmap), mapping(m) {
       mapping->_start(*osdmap);
     }
-    void process(int64_t pool, unsigned ps_begin, unsigned ps_end) {
+    void process(int64_t pool, unsigned ps_begin, unsigned ps_end) override {
       mapping->_update_range(*osdmap, pool, ps_begin, ps_end);
     }
-    void complete() {
+    void complete() override {
       mapping->_finish(*osdmap);
     }
   };
index 9bd41830888f3a01f6d5bd645a7182c935357abe..a32e03b9e937ec76564e9be9cc5421699f02309d 100644 (file)
@@ -76,7 +76,7 @@ struct OpRequest : public TrackedOp {
     return classes_;
   }
 
-  void _dump(Formatter *f) const;
+  void _dump(Formatter *f) const override;
 
   bool has_feature(uint64_t f) const {
     return request->get_connection()->has_feature(f);
@@ -100,11 +100,11 @@ private:
   OpRequest(Message *req, OpTracker *tracker);
 
 protected:
-  void _dump_op_descriptor_unlocked(ostream& stream) const;
-  void _unregistered();
+  void _dump_op_descriptor_unlocked(ostream& stream) const override;
+  void _unregistered() override;
 
 public:
-  ~OpRequest() {
+  ~OpRequest() override {
     request->put();
   }
 
@@ -123,7 +123,7 @@ public:
     }
   }
 
-  const char *state_string() const {
+  const char *state_string() const override {
     switch(latest_flag_point) {
     case flag_queued_for_pg: return "queued for pg";
     case flag_reached_pg: return "reached pg";
index 16ba57be1f7858da51c5645054eb81c67a53304d..6c90e8d2c1800d62edfc5d32c820f3ef12845574 100644 (file)
@@ -205,9 +205,9 @@ protected:
 
   virtual PGBackend *get_pgbackend() = 0;
 public:
-  std::string gen_prefix() const;
-  CephContext *get_cct() const { return cct; }
-  unsigned get_subsys() const { return ceph_subsys_osd; }
+  std::string gen_prefix() const override;
+  CephContext *get_cct() const override { return cct; }
+  unsigned get_subsys() const override { return ceph_subsys_osd; }
 
   /*** PG ****/
   void update_snap_mapper_bits(uint32_t bits) {
@@ -527,7 +527,7 @@ public:
     eversion_t v;
     C_UpdateLastRollbackInfoTrimmedToApplied(PG *pg, epoch_t e, eversion_t v)
       : pg(pg), e(e), v(v) {}
-    void finish(int) {
+    void finish(int) override {
       pg->lock();
       if (!pg->pg_has_reset_since(e)) {
        pg->last_rollback_info_trimmed_to_applied = v;
@@ -981,20 +981,20 @@ public:
     PGLogEntryHandler(PG *pg, ObjectStore::Transaction *t) : pg(pg), t(t) {}
 
     // LogEntryHandler
-    void remove(const hobject_t &hoid) {
+    void remove(const hobject_t &hoid) override {
       pg->get_pgbackend()->remove(hoid, t);
     }
-    void try_stash(const hobject_t &hoid, version_t v) {
+    void try_stash(const hobject_t &hoid, version_t v) override {
       pg->get_pgbackend()->try_stash(hoid, v, t);
     }
-    void rollback(const pg_log_entry_t &entry) {
+    void rollback(const pg_log_entry_t &entry) override {
       assert(entry.can_rollback());
       pg->get_pgbackend()->rollback(entry, t);
     }
-    void rollforward(const pg_log_entry_t &entry) {
+    void rollforward(const pg_log_entry_t &entry) override {
       pg->get_pgbackend()->rollforward(entry, t);
     }
-    void trim(const pg_log_entry_t &entry) {
+    void trim(const pg_log_entry_t &entry) override {
       pg->get_pgbackend()->trim(entry, t);
     }
   };
@@ -1349,7 +1349,7 @@ public:
     EVT evt;
     QueuePeeringEvt(PG *pg, epoch_t epoch, EVT evt) :
       pg(pg), epoch(epoch), evt(evt) {}
-    void finish(int r) {
+    void finish(int r) override {
       pg->lock();
       pg->queue_peering_event(PG::CephPeeringEvtRef(
                                new PG::CephPeeringEvt(
@@ -2115,7 +2115,7 @@ public:
  public:
   PG(OSDService *o, OSDMapRef curmap,
      const PGPool &pool, spg_t p);
-  virtual ~PG();
+  ~PG() override;
 
  private:
   // Prevent copying
index d67faab20e95a7d1de38ba9e3e672eadb9c36077..5096e203179cc922b3c974ed11dd6da1fd0618b1 100644 (file)
@@ -33,14 +33,14 @@ class CephContext;
 
 struct PGLog : DoutPrefixProvider {
   DoutPrefixProvider *prefix_provider;
-  string gen_prefix() const {
+  string gen_prefix() const override {
     return prefix_provider ? prefix_provider->gen_prefix() : "";
   }
-  unsigned get_subsys() const {
+  unsigned get_subsys() const override {
     return prefix_provider ? prefix_provider->get_subsys() :
       (unsigned)ceph_subsys_osd;
   }
-  CephContext *get_cct() const {
+  CephContext *get_cct() const override {
     return cct;
   }
 
@@ -66,7 +66,7 @@ struct PGLog : DoutPrefixProvider {
     explicit read_log_and_missing_error(const char *what) {
       snprintf(buf, sizeof(buf), "read_log_and_missing_error: %s", what);
     }
-    const char *what() const throw () {
+    const char *what() const throw () override {
       return buf;
     }
   private:
index 3f3f5b088f7cd96c94f177a427b35ea221b2798f..becd818b89965a9af75c165ff65e70be4188c2ba 100644 (file)
@@ -122,7 +122,7 @@ protected:
 
 public:
   /// Provide the final size of the copied object to the CopyCallback
-  ~CopyCallback() {}
+  ~CopyCallback() override {}
 };
 
 template <typename T>
@@ -209,7 +209,7 @@ struct OnReadComplete : public Context {
       opcontext->async_read_result = r;
     opcontext->finish_read(pg);
   }
-  ~OnReadComplete() {}
+  ~OnReadComplete() override {}
 };
 
 class PrimaryLogPG::C_OSD_AppliedRecoveredObject : public Context {
@@ -280,7 +280,7 @@ public:
     : results(NULL),
       retval(0),
       ctx(ctx_) {}
-  ~CopyFromCallback() {}
+  ~CopyFromCallback() override {}
 
   void finish(PrimaryLogPG::CopyCallbackResults results_) override {
     results = results_.get<1>();
@@ -689,7 +689,7 @@ public:
 
     return 0;
   }
-  ~PGLSPlainFilter() {}
+  ~PGLSPlainFilter() override {}
   bool filter(const hobject_t &obj, bufferlist& xattr_data,
                       bufferlist& outdata) override;
 };
@@ -712,7 +712,7 @@ public:
 
     return 0;
   }
-  ~PGLSParentFilter() {}
+  ~PGLSParentFilter() override {}
   bool filter(const hobject_t &obj, bufferlist& xattr_data,
                       bufferlist& outdata) override;
 };
index 802daef3e93f6ee90705d30b1a76db6eeddbcf24..d5f613e56776782d664a0e10d843643f3afeb460 100644 (file)
@@ -351,7 +351,7 @@ public:
     return manager.try_get_read_lock(hoid, obc);
   }
 
-  void release_locks(ObcLockManager &manager) {
+  void release_locks(ObcLockManager &manager) override {
     release_object_locks(manager);
   }
 
@@ -1287,17 +1287,17 @@ protected:
   friend struct C_Flush;
 
   // -- scrub --
-  virtual bool _range_available_for_scrub(
+  bool _range_available_for_scrub(
     const hobject_t &begin, const hobject_t &end) override;
-  virtual void scrub_snapshot_metadata(
+  void scrub_snapshot_metadata(
     ScrubMap &map,
     const std::map<hobject_t, pair<uint32_t, uint32_t>> &missing_digest) override;
-  virtual void _scrub_clear_state() override;
-  virtual void _scrub_finish() override;
+  void _scrub_clear_state() override;
+  void _scrub_finish() override;
   object_stat_collection_t scrub_cstat;
 
-  virtual void _split_into(pg_t child_pgid, PG *child,
-                          unsigned split_bits) override;
+  void _split_into(pg_t child_pgid, PG *child,
+                   unsigned split_bits) override;
   void apply_and_flush_repops(bool requeue);
 
   void calc_trim_to() override;
@@ -1334,7 +1334,7 @@ protected:
 public:
   PrimaryLogPG(OSDService *o, OSDMapRef curmap,
               const PGPool &_pool, spg_t p);
-  ~PrimaryLogPG() {}
+  ~PrimaryLogPG() override {}
 
   int do_command(
     cmdmap_t cmdmap,
index 1ae2d0d0de9ce1953edf3e664c1f4211c9872536..8d942b0cf76e06811abb1ddcfd36f1b7f566473c 100644 (file)
@@ -324,7 +324,7 @@ struct AsyncReadCallback : public GenContext<ThreadPool::TPHandle&> {
     c->complete(r);
     c = NULL;
   }
-  ~AsyncReadCallback() {
+  ~AsyncReadCallback() override {
     delete c;
   }
 };
index c4f40ae81c1a98946f20e1e79b0c22752810ee48..f2ceda687c65b0733733a6c54575c64305f99f7e 100644 (file)
@@ -38,14 +38,14 @@ public:
   RPGHandle *_open_recovery_op() {
     return new RPGHandle();
   }
-  PGBackend::RecoveryHandle *open_recovery_op() {
+  PGBackend::RecoveryHandle *open_recovery_op() override {
     return _open_recovery_op();
   }
 
   /// @see PGBackend::run_recovery_op
   void run_recovery_op(
     PGBackend::RecoveryHandle *h,
-    int priority);
+    int priority) override;
 
   /// @see PGBackend::recover_object
   void recover_object(
@@ -54,29 +54,29 @@ public:
     ObjectContextRef head,
     ObjectContextRef obc,
     RecoveryHandle *h
-    );
+    ) override;
 
-  void check_recovery_sources(const OSDMapRef& osdmap);
+  void check_recovery_sources(const OSDMapRef& osdmap) override;
 
   /// @see PGBackend::delay_message_until_active
-  bool can_handle_while_inactive(OpRequestRef op);
+  bool can_handle_while_inactive(OpRequestRef op) override;
 
   /// @see PGBackend::handle_message
   bool handle_message(
     OpRequestRef op
-    );
+    ) override;
 
-  void on_change();
-  void clear_recovery_state();
-  void on_flushed();
+  void on_change() override;
+  void clear_recovery_state() override;
+  void on_flushed() override;
 
   class RPCRecPred : public IsPGRecoverablePredicate {
   public:
-    bool operator()(const set<pg_shard_t> &have) const {
+    bool operator()(const set<pg_shard_t> &have) const override {
       return !have.empty();
     }
   };
-  IsPGRecoverablePredicate *get_is_recoverable_predicate() {
+  IsPGRecoverablePredicate *get_is_recoverable_predicate() override {
     return new RPCRecPred;
   }
 
@@ -84,15 +84,15 @@ public:
     pg_shard_t whoami;
   public:
     explicit RPCReadPred(pg_shard_t whoami) : whoami(whoami) {}
-    bool operator()(const set<pg_shard_t> &have) const {
+    bool operator()(const set<pg_shard_t> &have) const override {
       return have.count(whoami);
     }
   };
-  IsPGReadablePredicate *get_is_readable_predicate() {
+  IsPGReadablePredicate *get_is_readable_predicate() override {
     return new RPCReadPred(get_parent()->whoami_shard());
   }
 
-  virtual void dump_recovery_info(Formatter *f) const {
+  void dump_recovery_info(Formatter *f) const override {
     {
       f->open_array_section("pull_from_peer");
       for (map<pg_shard_t, set<hobject_t> >::const_iterator i = pull_from_peer.begin();
@@ -151,14 +151,14 @@ public:
     uint64_t off,
     uint64_t len,
     uint32_t op_flags,
-    bufferlist *bl);
+    bufferlist *bl) override;
 
   void objects_read_async(
     const hobject_t &hoid,
     const list<pair<boost::tuple<uint64_t, uint64_t, uint32_t>,
               pair<bufferlist*, Context*> > > &to_read,
                Context *on_complete,
-               bool fast_read = false);
+               bool fast_read = false) override;
 
 private:
   // push
@@ -380,7 +380,7 @@ public:
     ceph_tid_t tid,
     osd_reqid_t reqid,
     OpRequestRef op
-    );
+    ) override;
 
 private:
   Message * generate_subop(
@@ -434,16 +434,16 @@ private:
 
   void sub_op_modify_applied(RepModifyRef rm);
   void sub_op_modify_commit(RepModifyRef rm);
-  bool scrub_supported() { return true; }
-  bool auto_repair_supported() const { return false; }
+  bool scrub_supported() override { return true; }
+  bool auto_repair_supported() const override { return false; }
 
 
   void be_deep_scrub(
     const hobject_t &obj,
     uint32_t seed,
     ScrubMap::object &o,
-    ThreadPool::TPHandle &handle);
-  uint64_t be_get_ondisk_size(uint64_t logical_size) { return logical_size; }
+    ThreadPool::TPHandle &handle) override;
+  uint64_t be_get_ondisk_size(uint64_t logical_size) override { return logical_size; }
 };
 
 #endif
index ef59cdedee9112933f88bbf8af27c0fd5bc0257d..241f581b6d7f54cd74187a8937c25d86d5d9f300 100644 (file)
@@ -45,15 +45,15 @@ public:
       : cid(cid), hoid(hoid), t(t) {}
   public:
     void set_keys(
-      const std::map<std::string, bufferlist> &to_set) {
+      const std::map<std::string, bufferlist> &to_set) override {
       t->omap_setkeys(cid, hoid, to_set);
     }
     void remove_keys(
-      const std::set<std::string> &to_remove) {
+      const std::set<std::string> &to_remove) override {
       t->omap_rmkeys(cid, hoid, to_remove);
     }
     void add_callback(
-      Context *c) {
+      Context *c) override {
       t->register_on_applied(c);
     }
   };
@@ -67,10 +67,10 @@ public:
     os(os), cid(cid), hoid(hoid) {}
   int get_keys(
     const std::set<std::string> &keys,
-    std::map<std::string, bufferlist> *out);
+    std::map<std::string, bufferlist> *out) override;
   int get_next(
     const std::string &key,
-    pair<std::string, bufferlist> *next);
+    pair<std::string, bufferlist> *next) override;
 };
 
 /**
index 8386caf362613e82d0b6edd873ff7d431e033a67..a0305b65213e5fe3f3996ccf1aaf2a36a3a6c781 100644 (file)
@@ -424,7 +424,7 @@ class ObjectCacher {
     ObjectCacher *oc;
   public:
     explicit FlusherThread(ObjectCacher *o) : oc(o) {}
-    void *entry() {
+    void *entry() override {
       oc->flusher_entry();
       return 0;
     }
index 595549d3e8e5950bcd0cc86485c18b57d2382565..d45e4c45fb0ab139582c08e8908213e764b90f14 100644 (file)
@@ -179,7 +179,7 @@ public:
     second = NULL;
   }
 
-  ~C_TwoContexts() {
+  ~C_TwoContexts() override {
     delete first;
     delete second;
   }
index b00ed2218187bc64f1e755e41c5d676cbc2837d3..534da8da1f88fd6fd1a17dbb97eea05dd0852ab4 100644 (file)
@@ -232,7 +232,7 @@ struct ObjectOperation {
     C_ObjectOperation_stat(uint64_t *ps, ceph::real_time *pm, time_t *pt, struct timespec *_pts,
                           int *prval)
       : psize(ps), pmtime(pm), ptime(pt), pts(_pts), prval(prval) {}
-    void finish(int r) {
+    void finish(int r) override {
       if (r >= 0) {
        bufferlist::iterator p = bl.begin();
        try {
@@ -302,7 +302,7 @@ struct ObjectOperation {
                                  std::map<uint64_t, uint64_t> *extents,
                                  int *prval)
       : data_bl(data_bl), extents(extents), prval(prval) {}
-    void finish(int r) {
+    void finish(int r) override {
       bufferlist::iterator iter = bl.begin();
       if (r >= 0) {
        try {
@@ -388,7 +388,7 @@ struct ObjectOperation {
        *ptruncated = false;
       }
     }
-    void finish(int r) {
+    void finish(int r) override {
       if (r >= 0) {
        bufferlist::iterator p = bl.begin();
        try {
@@ -430,7 +430,7 @@ struct ObjectOperation {
        *ptruncated = false;
       }
     }
-    void finish(int r) {
+    void finish(int r) override {
       if (r >= 0) {
        bufferlist::iterator p = bl.begin();
        try {
@@ -465,7 +465,7 @@ struct ObjectOperation {
     int *prval;
     C_ObjectOperation_decodewatchers(list<obj_watch_t> *pw, int *pr)
       : pwatchers(pw), prval(pr) {}
-    void finish(int r) {
+    void finish(int r) override {
       if (r >= 0) {
        bufferlist::iterator p = bl.begin();
        try {
@@ -498,7 +498,7 @@ struct ObjectOperation {
     int *prval;
     C_ObjectOperation_decodesnaps(librados::snap_set_t *ps, int *pr)
       : psnaps(ps), prval(pr) {}
-    void finish(int r) {
+    void finish(int r) override {
       if (r >= 0) {
        bufferlist::iterator p = bl.begin();
        try {
@@ -709,7 +709,7 @@ struct ObjectOperation {
        out_truncate_seq(otseq),
        out_truncate_size(otsize),
        prval(r) {}
-    void finish(int r) {
+    void finish(int r) override {
       // reqids are copied on ENOENT
       if (r < 0 && r != -ENOENT)
        return;
@@ -802,7 +802,7 @@ struct ObjectOperation {
     int *prval;
     C_ObjectOperation_isdirty(bool *p, int *r)
       : pisdirty(p), prval(r) {}
-    void finish(int r) {
+    void finish(int r) override {
       if (r < 0)
        return;
       try {
@@ -838,7 +838,7 @@ struct ObjectOperation {
                                                      ceph::real_time> > *ut,
                                 int *r)
       : ptls(t), putls(ut), prval(r) {}
-    void finish(int r) {
+    void finish(int r) override {
       if (r < 0)
        return;
       try {
@@ -1119,9 +1119,9 @@ struct ObjectOperation {
 class Objecter : public md_config_obs_t, public Dispatcher {
 public:
   // config observer bits
-  virtual const char** get_tracked_conf_keys() const;
-  virtual void handle_conf_change(const struct md_config_t *conf,
-                                 const std::set <std::string> &changed);
+  const char** get_tracked_conf_keys() const override;
+  void handle_conf_change(const struct md_config_t *conf,
+                          const std::set <std::string> &changed) override;
 
 public:
   Messenger *messenger;
@@ -1344,7 +1344,7 @@ public:
     }
 
   private:
-    ~Op() {
+    ~Op() override {
       while (!out_handler.empty()) {
        delete out_handler.back();
        out_handler.pop_back();
@@ -1358,7 +1358,7 @@ public:
     version_t latest;
     C_Op_Map_Latest(Objecter *o, ceph_tid_t t) : objecter(o), tid(t),
                                                 latest(0) {}
-    void finish(int r);
+    void finish(int r) override;
   };
 
   struct C_Command_Map_Latest : public Context {
@@ -1367,7 +1367,7 @@ public:
     version_t latest;
     C_Command_Map_Latest(Objecter *o, ceph_tid_t t) :  objecter(o), tid(t),
                                                       latest(0) {}
-    void finish(int r);
+    void finish(int r) override;
   };
 
   struct C_Stat : public Context {
@@ -1377,7 +1377,7 @@ public:
     Context *fin;
     C_Stat(uint64_t *ps, ceph::real_time *pm, Context *c) :
       psize(ps), pmtime(pm), fin(c) {}
-    void finish(int r) {
+    void finish(int r) override {
       if (r >= 0) {
        bufferlist::iterator p = bl.begin();
        uint64_t s;
@@ -1399,7 +1399,7 @@ public:
     Context *fin;
     C_GetAttrs(map<string, bufferlist>& set, Context *c) : attrset(set),
                                                           fin(c) {}
-    void finish(int r) {
+    void finish(int r) override {
       if (r >= 0) {
        bufferlist::iterator p = bl.begin();
        ::decode(attrset, p);
@@ -1454,7 +1454,7 @@ public:
     epoch_t epoch;
     C_NList(NListContext *lc, Context * finish, Objecter *ob) :
       list_context(lc), final_finish(finish), objecter(ob), epoch(0) {}
-    void finish(int r) {
+    void finish(int r) override {
       if (r >= 0) {
        objecter->_nlist_reply(list_context, r, final_finish, epoch);
       } else {
@@ -1656,7 +1656,7 @@ public:
     }
 
   private:
-    ~LingerOp() {
+    ~LingerOp() override {
       delete watch_context;
     }
   };
@@ -1668,10 +1668,10 @@ public:
     C_Linger_Commit(Objecter *o, LingerOp *l) : objecter(o), info(l) {
       info->get();
     }
-    ~C_Linger_Commit() {
+    ~C_Linger_Commit() override {
       info->put();
     }
-    void finish(int r) {
+    void finish(int r) override {
       objecter->_linger_commit(info, r, outbl);
     }
   };
@@ -1682,10 +1682,10 @@ public:
     C_Linger_Reconnect(Objecter *o, LingerOp *l) : objecter(o), info(l) {
       info->get();
     }
-    ~C_Linger_Reconnect() {
+    ~C_Linger_Reconnect() override {
       info->put();
     }
-    void finish(int r) {
+    void finish(int r) override {
       objecter->_linger_reconnect(info, r);
     }
   };
@@ -1699,10 +1699,10 @@ public:
       : objecter(o), info(l), register_gen(info->register_gen) {
       info->get();
     }
-    ~C_Linger_Ping() {
+    ~C_Linger_Ping() override {
       info->put();
     }
-    void finish(int r) {
+    void finish(int r) override {
       objecter->_linger_ping(info, r, sent, register_gen);
     }
   };
@@ -1713,7 +1713,7 @@ public:
     version_t latest;
     C_Linger_Map_Latest(Objecter *o, uint64_t id) :
       objecter(o), linger_id(id), latest(0) {}
-    void finish(int r);
+    void finish(int r) override;
   };
 
   // -- osd sessions --
@@ -1753,7 +1753,7 @@ public:
       num_locks(cct->_conf->objecter_completion_locks_per_session),
       completion_locks(new std::mutex[num_locks]) {}
 
-    ~OSDSession();
+    ~OSDSession() override;
 
     bool is_homeless() { return (osd == -1); }
 
@@ -1933,7 +1933,7 @@ private:
     epoch_barrier(0),
     retry_writes_after_first_reply(cct->_conf->objecter_retry_writes_after_first_reply)
   { }
-  ~Objecter();
+  ~Objecter() override;
 
   void init();
   void start(const OSDMap *o = nullptr);
@@ -2009,8 +2009,8 @@ private:
 
   // messages
  public:
-  bool ms_dispatch(Message *m);
-  bool ms_can_fast_dispatch_any() const {
+  bool ms_dispatch(Message *m) override;
+  bool ms_can_fast_dispatch_any() const override {
     return true;
   }
   bool ms_can_fast_dispatch(const Message *m) const override {
@@ -2022,7 +2022,7 @@ private:
       return false;
     }
   }
-  void ms_fast_dispatch(Message *m) {
+  void ms_fast_dispatch(Message *m) override {
     ms_dispatch(m);
   }
 
@@ -2837,7 +2837,7 @@ public:
       extents.swap(e);
       resultbl.swap(r);
     }
-    void finish(int r) {
+    void finish(int r) override {
       objecter->_sg_read_finish(extents, resultbl, bl, onfinish);
     }
   };
@@ -2907,13 +2907,13 @@ public:
                   op_flags);
   }
 
-  void ms_handle_connect(Connection *con);
-  bool ms_handle_reset(Connection *con);
-  void ms_handle_remote_reset(Connection *con);
-  bool ms_handle_refused(Connection *con);
+  void ms_handle_connect(Connection *con) override;
+  bool ms_handle_reset(Connection *con) override;
+  void ms_handle_remote_reset(Connection *con) override;
+  bool ms_handle_refused(Connection *con) override;
   bool ms_get_authorizer(int dest_type,
                         AuthAuthorizer **authorizer,
-                        bool force_new);
+                        bool force_new) override;
 
   void blacklist_self(bool set);