]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: add override in header files
authorliuchang0812 <liuchang0812@gmail.com>
Mon, 20 Feb 2017 14:23:47 +0000 (22:23 +0800)
committerliuchang0812 <liuchang0812@gmail.com>
Tue, 21 Feb 2017 08:54:35 +0000 (16:54 +0800)
Fixes: http://tracker.ceph.com/issues/19012
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
72 files changed:
src/librbd/AsyncObjectThrottle.h
src/librbd/ExclusiveLock.h
src/librbd/ImageWatcher.h
src/librbd/Journal.h
src/librbd/LibrbdAdminSocketHook.h
src/librbd/LibrbdWriteback.h
src/librbd/ManagedLock.h
src/librbd/MirroringWatcher.h
src/librbd/TaskFinisher.h
src/librbd/Utils.h
src/librbd/Watcher.h
src/librbd/cache/PassthroughImageCache.h
src/librbd/exclusive_lock/AutomaticPolicy.h
src/librbd/exclusive_lock/StandardPolicy.h
src/librbd/internal.h
src/librbd/io/AioCompletion.h
src/librbd/io/ImageRequest.h
src/librbd/io/ImageRequestWQ.h
src/librbd/io/ObjectRequest.h
src/librbd/journal/DisabledPolicy.h
src/librbd/journal/Replay.h
src/librbd/journal/StandardPolicy.h
src/librbd/journal/Utils.h
src/librbd/object_map/InvalidateRequest.h
src/librbd/object_map/Request.h
src/librbd/object_map/ResizeRequest.h
src/librbd/object_map/SnapshotCreateRequest.h
src/librbd/object_map/SnapshotRemoveRequest.h
src/librbd/object_map/SnapshotRollbackRequest.h
src/librbd/object_map/UpdateRequest.h
src/librbd/operation/DisableFeaturesRequest.h
src/librbd/operation/EnableFeaturesRequest.h
src/librbd/operation/FlattenRequest.h
src/librbd/operation/MetadataRemoveRequest.h
src/librbd/operation/MetadataSetRequest.h
src/librbd/operation/ObjectMapIterate.h
src/librbd/operation/RebuildObjectMapRequest.h
src/librbd/operation/RenameRequest.h
src/librbd/operation/Request.h
src/librbd/operation/ResizeRequest.h
src/librbd/operation/SnapshotCreateRequest.h
src/librbd/operation/SnapshotLimitRequest.h
src/librbd/operation/SnapshotProtectRequest.h
src/librbd/operation/SnapshotRemoveRequest.h
src/librbd/operation/SnapshotRenameRequest.h
src/librbd/operation/SnapshotRollbackRequest.h
src/librbd/operation/SnapshotUnprotectRequest.h
src/librbd/operation/TrimRequest.h
src/librbd/watcher/Notifier.h
src/librbd/watcher/Types.h
src/rbd_replay/Replayer.hpp
src/rbd_replay/actions.hpp
src/rbd_replay/ios.hpp
src/test/librbd/io/test_mock_ImageRequest.cc
src/test/librbd/test_fixture.h
src/test/librbd/test_mock_fixture.h
src/test/rbd_mirror/test_ClusterWatcher.cc
src/test/rbd_mirror/test_PoolWatcher.cc
src/test/rbd_mirror/test_fixture.h
src/test/rbd_mirror/test_mock_fixture.h
src/tools/rbd/IndentStream.h
src/tools/rbd/Utils.h
src/tools/rbd_mirror/ImageDeleter.h
src/tools/rbd_mirror/ImageReplayer.h
src/tools/rbd_mirror/ImageSync.h
src/tools/rbd_mirror/ImageSyncThrottler.h
src/tools/rbd_mirror/LeaderWatcher.h
src/tools/rbd_mirror/MirrorStatusWatcher.h
src/tools/rbd_mirror/Replayer.h
src/tools/rbd_mirror/image_replayer/BootstrapRequest.h
src/tools/rbd_mirror/image_sync/ImageCopyRequest.h
src/tools/rbd_mirror/image_sync/SnapshotCopyRequest.h

index 845e487579972b65e90f6ae89c643ff5d3ef5137..e1b089626c3495e6e34466cfef1189061405a1f5 100644 (file)
@@ -33,7 +33,7 @@ public:
 protected:
   ImageCtxT &m_image_ctx;
 
-  virtual void finish(int r) {
+  void finish(int r) override {
     m_finisher.finish_op(r);
   }
 
@@ -55,7 +55,7 @@ public:
                      uint64_t end_object_no);
 
   void start_ops(uint64_t max_concurrent);
-  virtual void finish_op(int r);
+  void finish_op(int r) override;
 
 private:
   Mutex m_lock;
index 9947fe380ad72ebfc70f284e60badc5fe210a3e5..092f7094a6c6ffb78c5ed3e1bf4bc9ad4e479008 100644 (file)
@@ -29,13 +29,13 @@ public:
   void handle_peer_notification(int r);
 
 protected:
-  virtual void shutdown_handler(int r, Context *on_finish);
-  virtual void pre_acquire_lock_handler(Context *on_finish);
-  virtual void post_acquire_lock_handler(int r, Context *on_finish);
-  virtual void pre_release_lock_handler(bool shutting_down,
-                                        Context *on_finish);
-  virtual void post_release_lock_handler(bool shutting_down, int r,
-                                         Context *on_finish);
+  void shutdown_handler(int r, Context *on_finish) override;
+  void pre_acquire_lock_handler(Context *on_finish) override;
+  void post_acquire_lock_handler(int r, Context *on_finish) override;
+  void pre_release_lock_handler(bool shutting_down,
+                                Context *on_finish) override;
+  void post_release_lock_handler(bool shutting_down, int r,
+                                 Context *on_finish) override;
 
 private:
 
index 42d85b32128bba4e03a43ca511d9bf40dce23d99..14b5a6dc96d492cd75d414a81a594bb307d8ba27 100644 (file)
@@ -32,7 +32,7 @@ class ImageWatcher : public Watcher {
 
 public:
   ImageWatcher(ImageCtxT& image_ctx);
-  virtual ~ImageWatcher();
+  ~ImageWatcher() override;
 
   void unregister_watch(Context *on_finish);
 
@@ -104,7 +104,7 @@ private:
     {
     }
 
-    virtual int update_progress(uint64_t offset, uint64_t total) {
+    int update_progress(uint64_t offset, uint64_t total) override {
       m_image_watcher.schedule_async_progress(m_async_request_id, offset,
                                               total);
       return 0;
@@ -125,11 +125,11 @@ private:
     {
     }
 
-    virtual ~RemoteContext() {
+    ~RemoteContext() override {
       delete m_prog_ctx;
     }
 
-    virtual void finish(int r);
+    void finish(int r) override;
 
   private:
     ImageWatcher &m_image_watcher;
@@ -149,7 +149,7 @@ private:
         payload(payload) {
     }
 
-    virtual void finish(int r) override {
+    void finish(int r) override {
       image_watcher->process_payload(notify_id, handle, payload, r);
     }
   };
@@ -159,7 +159,7 @@ private:
 
     C_ResponseMessage(watcher::C_NotifyAck *notify_ack) : notify_ack(notify_ack) {
     }
-    virtual void finish(int r);
+    void finish(int r) override;
   };
 
   ImageCtxT &m_image_ctx;
@@ -245,10 +245,10 @@ private:
   void process_payload(uint64_t notify_id, uint64_t handle,
                              const watch_notify::Payload &payload, int r);
 
-  virtual void handle_notify(uint64_t notify_id, uint64_t handle,
-                             uint64_t notifier_id, bufferlist &bl);
-  virtual void handle_error(uint64_t cookie, int err);
-  virtual void handle_rewatch_complete(int r);
+  void handle_notify(uint64_t notify_id, uint64_t handle,
+                     uint64_t notifier_id, bufferlist &bl) override;
+  void handle_error(uint64_t cookie, int err) override;
+  void handle_rewatch_complete(int r) override;
 
   void send_notify(const watch_notify::Payload& payload,
                    Context *ctx = nullptr);
index 8c5084aa1522e432933eaa847ac0e796b7e0cce4..022ba9c28326890c8afaa670d980fe8fd7adf377 100644 (file)
@@ -221,7 +221,7 @@ private:
       : journal(_journal), tid(_tid) {
     }
 
-    virtual void finish(int r) {
+    void finish(int r) override {
       journal->handle_io_event_safe(r, tid);
     }
   };
@@ -239,7 +239,7 @@ private:
         op_finish_future(op_finish_future), on_safe(on_safe) {
     }
 
-    virtual void finish(int r) {
+    void finish(int r) override {
       journal->handle_op_event_safe(r, tid, op_start_future, op_finish_future,
                                     on_safe);
     }
@@ -252,7 +252,7 @@ private:
     C_ReplayProcessSafe(Journal *journal, ReplayEntry &&replay_entry) :
       journal(journal), replay_entry(std::move(replay_entry)) {
     }
-    virtual void finish(int r) {
+    void finish(int r) override {
       journal->handle_replay_process_safe(replay_entry, r);
     }
   };
@@ -262,17 +262,17 @@ private:
     ReplayHandler(Journal *_journal) : journal(_journal) {
     }
 
-    virtual void get() {
+    void get() override {
       // TODO
     }
-    virtual void put() {
+    void put() override {
       // TODO
     }
 
-    virtual void handle_entries_available() {
+    void handle_entries_available() override {
       journal->handle_replay_ready();
     }
-    virtual void handle_complete(int r) {
+    void handle_complete(int r) override {
       journal->handle_replay_complete(r);
     }
   };
@@ -315,7 +315,7 @@ private:
 
     MetadataListener(Journal<ImageCtxT> *journal) : journal(journal) { }
 
-    void handle_update(::journal::JournalMetadata *) {
+    void handle_update(::journal::JournalMetadata *) override {
       FunctionContext *ctx = new FunctionContext([this](int r) {
         journal->handle_metadata_updated();
       });
index ecd8988f7208f2af80e72711b8d2143e2ec8877e..cdc2e3db09aba3df025cfe02074a9e5c7e680631 100644 (file)
@@ -15,10 +15,10 @@ namespace librbd {
   class LibrbdAdminSocketHook : public AdminSocketHook {
   public:
     LibrbdAdminSocketHook(ImageCtx *ictx);
-    ~LibrbdAdminSocketHook();
+    ~LibrbdAdminSocketHook() override;
 
     bool call(std::string command, cmdmap_t& cmdmap, std::string format,
-             bufferlist& out);
+             bufferlist& out) override;
 
   private:
     typedef std::map<std::string,LibrbdAdminSocketCommand*> Commands;
index 771757b64dc3700c2ef44f583dd2ff0d5cf040c5..9c47f98bc181bab76f420243d6d974c15fc85252 100644 (file)
@@ -21,28 +21,28 @@ namespace librbd {
     LibrbdWriteback(ImageCtx *ictx, Mutex& lock);
 
     // Note that oloc, trunc_size, and trunc_seq are ignored
-    virtual void read(const object_t& oid, uint64_t object_no,
-                     const object_locator_t& oloc, uint64_t off, uint64_t len,
-                     snapid_t snapid, bufferlist *pbl, uint64_t trunc_size,
-                     __u32 trunc_seq, int op_flags, Context *onfinish);
+    void read(const object_t& oid, uint64_t object_no,
+              const object_locator_t& oloc, uint64_t off, uint64_t len,
+              snapid_t snapid, bufferlist *pbl, uint64_t trunc_size,
+              __u32 trunc_seq, int op_flags, Context *onfinish) override;
 
     // Determine whether a read to this extent could be affected by a
     // write-triggered copy-on-write
-    virtual bool may_copy_on_write(const object_t& oid, uint64_t read_off,
-                                  uint64_t read_len, snapid_t snapid);
+    bool may_copy_on_write(const object_t& oid, uint64_t read_off,
+                           uint64_t read_len, snapid_t snapid) override;
 
     // Note that oloc, trunc_size, and trunc_seq are ignored
-    virtual ceph_tid_t write(const object_t& oid, const object_locator_t& oloc,
-                            uint64_t off, uint64_t len,
-                            const SnapContext& snapc, const bufferlist &bl,
-                            ceph::real_time mtime, uint64_t trunc_size,
-                            __u32 trunc_seq, ceph_tid_t journal_tid,
-                            Context *oncommit);
+    ceph_tid_t write(const object_t& oid, const object_locator_t& oloc,
+                     uint64_t off, uint64_t len,
+                     const SnapContext& snapc, const bufferlist &bl,
+                     ceph::real_time mtime, uint64_t trunc_size,
+                     __u32 trunc_seq, ceph_tid_t journal_tid,
+                     Context *oncommit) override;
     using WritebackHandler::write;
 
-    virtual void overwrite_extent(const object_t& oid, uint64_t off,
-                                 uint64_t len, ceph_tid_t original_journal_tid,
-                                  ceph_tid_t new_journal_tid);
+    void overwrite_extent(const object_t& oid, uint64_t off,
+                          uint64_t len, ceph_tid_t original_journal_tid,
+                          ceph_tid_t new_journal_tid) override;
 
     struct write_result_d {
       bool done;
@@ -50,7 +50,7 @@ namespace librbd {
       std::string oid;
       Context *oncommit;
       write_result_d(const std::string& oid, Context *oncommit) :
-       done(false), ret(0), oid(oid), oncommit(oncommit) {}
+        done(false), ret(0), oid(oid), oncommit(oncommit) {}
     private:
       write_result_d(const write_result_d& rhs);
       const write_result_d& operator=(const write_result_d& rhs);
index 390a4bd4f1d65e6056f8adc30c4a4957f6790185..a4071086d64d60ade11e5b4f509911ef53ccf111 100644 (file)
@@ -199,7 +199,7 @@ private:
     C_ShutDownRelease(ManagedLock *lock)
       : lock(lock) {
     }
-    virtual void finish(int r) override {
+    void finish(int r) override {
       lock->send_shutdown_release();
     }
   };
index 45925b4c7eef12349645eff22d80b094222d165e..407223bf85c47e97a1cfedd72819abd5d5c5a23b 100644 (file)
@@ -58,8 +58,8 @@ private:
   bool handle_payload(const mirroring_watcher::UnknownPayload &payload,
                       Context *on_notify_ack);
 
-  virtual void handle_notify(uint64_t notify_id, uint64_t handle,
-                             uint64_t notifier_id, bufferlist &bl);
+  void handle_notify(uint64_t notify_id, uint64_t handle,
+                     uint64_t notifier_id, bufferlist &bl) override;
 };
 
 } // namespace librbd
index e0aebd965f47fae1f5faa05e32db97170641a06c..172abef7fb3d4fe6f990116df71055ce25516190 100644 (file)
@@ -119,7 +119,7 @@ private:
     {
     }
   protected:
-    virtual void finish(int r) {
+    void finish(int r) override {
       m_task_finisher->complete(m_task);
     }
   private:
index c7cf89e973431b3c1301c277c840243d5babcf15..705152dcccbdf12ed88a505e5a71554b689618ac 100644 (file)
@@ -50,7 +50,7 @@ public:
   }
 
 protected:
-  virtual void finish(int r) {
+  void finish(int r) override {
     (obj->*MF)(r);
   }
 };
@@ -63,7 +63,7 @@ public:
   }
 
 protected:
-  virtual void complete(int r) override {
+  void complete(int r) override {
     Context *on_finish = (obj->*MF)(&r);
     if (on_finish != nullptr) {
       on_finish->complete(r);
@@ -73,7 +73,7 @@ protected:
     }
     Context::complete(r);
   }
-  virtual void finish(int r) override {
+  void finish(int r) override {
   }
 };
 
@@ -85,7 +85,7 @@ struct C_AsyncCallback : public Context {
   C_AsyncCallback(WQ *op_work_queue, Context *on_finish)
     : op_work_queue(op_work_queue), on_finish(on_finish) {
   }
-  virtual void finish(int r) {
+  void finish(int r) override {
     op_work_queue->queue(on_finish, r);
   }
 };
index f7fb3f48fd7f426c546058ba8b88368791aa77e3..3e353bdb6452431da08816b5cf2b92176f821ef7 100644 (file)
@@ -114,11 +114,11 @@ private:
 
     WatchCtx(Watcher &parent) : watcher(parent) {}
 
-    virtual void handle_notify(uint64_t notify_id,
-                               uint64_t handle,
-                              uint64_t notifier_id,
-                               bufferlist& bl);
-    virtual void handle_error(uint64_t handle, int err);
+    void handle_notify(uint64_t notify_id,
+                       uint64_t handle,
+                       uint64_t notifier_id,
+                       bufferlist& bl) override;
+    void handle_error(uint64_t handle, int err) override;
   };
 
   struct C_RegisterWatch : public Context {
@@ -128,7 +128,7 @@ private:
     C_RegisterWatch(Watcher *watcher, Context *on_finish)
        : watcher(watcher), on_finish(on_finish) {
     }
-    virtual void finish(int r) override {
+    void finish(int r) override {
       watcher->handle_register_watch(r, on_finish);
     }
   };
index aa4ceba69c473a7aa14206f3eb970a694636059d..9e451d1a7af10cf47a49756d40b6877b8ae92e6e 100644 (file)
@@ -22,20 +22,20 @@ public:
   PassthroughImageCache(ImageCtx &image_ctx);
 
   /// client AIO methods
-  virtual void aio_read(Extents&& image_extents, ceph::bufferlist *bl,
-                        int fadvise_flags, Context *on_finish);
-  virtual void aio_write(Extents&& image_extents, ceph::bufferlist&& bl,
-                         int fadvise_flags, Context *on_finish);
-  virtual void aio_discard(uint64_t offset, uint64_t length,
-                           Context *on_finish);
-  virtual void aio_flush(Context *on_finish);
+  void aio_read(Extents&& image_extents, ceph::bufferlist *bl,
+                int fadvise_flags, Context *on_finish) override;
+  void aio_write(Extents&& image_extents, ceph::bufferlist&& bl,
+                 int fadvise_flags, Context *on_finish) override;
+  void aio_discard(uint64_t offset, uint64_t length,
+                   Context *on_finish) override;
+  void aio_flush(Context *on_finish) override;
 
   /// internal state methods
-  virtual void init(Context *on_finish);
-  virtual void shut_down(Context *on_finish);
+  void init(Context *on_finish) override;
+  void shut_down(Context *on_finish) override;
 
-  virtual void invalidate(Context *on_finish);
-  virtual void flush(Context *on_finish);
+  void invalidate(Context *on_finish) override;
+  void flush(Context *on_finish) override;
 
 private:
   ImageCtxT &m_image_ctx;
index 6d15542789f80537d3f87904515d4977b383ab66..12ba9b6c4337082f273407d9b2ee4bf098e8db77 100644 (file)
@@ -17,11 +17,11 @@ public:
   AutomaticPolicy(ImageCtx *image_ctx) : m_image_ctx(image_ctx) {
   }
 
-  virtual bool may_auto_request_lock() {
+  bool may_auto_request_lock() override {
     return true;
   }
 
-  virtual int lock_requested(bool force);
+  int lock_requested(bool force) override;
 
 private:
   ImageCtx *m_image_ctx;
index 78a346d6656fa96934680b68efdcd07d025a9c12..c756db4f94abd1ae7152190cbd3c10026746f21b 100644 (file)
@@ -17,11 +17,11 @@ public:
   StandardPolicy(ImageCtx *image_ctx) : m_image_ctx(image_ctx) {
   }
 
-  virtual bool may_auto_request_lock() {
+  bool may_auto_request_lock() override {
     return false;
   }
 
-  virtual int lock_requested(bool force);
+  int lock_requested(bool force) override;
 
 private:
   ImageCtx *m_image_ctx;
index 22cd4bad2b630caba03880ee369c56d4c8ae9f1a..64be3a1810f706a4703df4086e1992fb787e4688 100644 (file)
@@ -61,7 +61,7 @@ namespace librbd {
     NoOpProgressContext()
     {
     }
-    int update_progress(uint64_t offset, uint64_t src_size)
+    int update_progress(uint64_t offset, uint64_t src_size) override
     {
       return 0;
     }
index 7c2099cf52e3a1e7dcd8bc8c1a1a3efcc18e494c..a484365d3095fe01887d43d391156b13a8536750 100644 (file)
@@ -212,8 +212,8 @@ public:
   C_AioRequest(AioCompletion *completion) : m_completion(completion) {
     m_completion->add_request();
   }
-  virtual ~C_AioRequest() {}
-  virtual void finish(int r) {
+  ~C_AioRequest() override {}
+  void finish(int r) override {
     m_completion->complete_request(r);
   }
 protected:
index 86ab4bf9aee5bdec04acd28db306a8ef1830ff21..0bdca22e63b25a743234e7f482b643d49481e325 100644 (file)
@@ -83,13 +83,13 @@ public:
                    int op_flags);
 
 protected:
-  virtual void send_request() override;
-  virtual void send_image_cache_request() override;
+  void send_request() override;
+  void send_image_cache_request() override;
 
-  virtual aio_type_t get_aio_type() const {
+  aio_type_t get_aio_type() const override {
     return AIO_TYPE_READ;
   }
-  virtual const char *get_request_type() const {
+  const char *get_request_type() const override {
     return "aio_read";
   }
 private:
@@ -101,7 +101,7 @@ private:
 template <typename ImageCtxT = ImageCtx>
 class AbstractImageWriteRequest : public ImageRequest<ImageCtxT> {
 public:
-  virtual bool is_write_op() const {
+  bool is_write_op() const override {
     return true;
   }
 
@@ -121,7 +121,7 @@ protected:
       m_synchronous(false) {
   }
 
-  virtual void send_request();
+  void send_request() override;
 
   virtual void prune_object_extents(ObjectExtents &object_extents) {
   }
@@ -162,30 +162,32 @@ protected:
   using typename ImageRequest<ImageCtxT>::ObjectRequests;
   using typename AbstractImageWriteRequest<ImageCtxT>::ObjectExtents;
 
-  virtual aio_type_t get_aio_type() const {
+  aio_type_t get_aio_type() const override {
     return AIO_TYPE_WRITE;
   }
-  virtual const char *get_request_type() const {
+  const char *get_request_type() const override {
     return "aio_write";
   }
 
   void assemble_extent(const ObjectExtent &object_extent, bufferlist *bl);
 
-  virtual void send_image_cache_request() override;
+  void send_image_cache_request() override;
 
-  virtual void send_object_cache_requests(const ObjectExtents &object_extents,
-                                          uint64_t journal_tid);
+  void send_object_cache_requests(const ObjectExtents &object_extents,
+                                  uint64_t journal_tid) override;
 
-  virtual void send_object_requests(const ObjectExtents &object_extents,
-                                    const ::SnapContext &snapc,
-                                    ObjectRequests *object_requests);
-  virtual ObjectRequestHandle *create_object_request(
+  void send_object_requests(const ObjectExtents &object_extents,
+                            const ::SnapContext &snapc,
+                            ObjectRequests *aio_object_requests) override;
+
+  ObjectRequestHandle *create_object_request(
       const ObjectExtent &object_extent, const ::SnapContext &snapc,
-      Context *on_finish);
+      Context *on_finish) override;
+
+  uint64_t append_journal_event(const ObjectRequests &requests,
+                                bool synchronous) override;
+  void update_stats(size_t length) override;
 
-  virtual uint64_t append_journal_event(const ObjectRequests &requests,
-                                        bool synchronous);
-  virtual void update_stats(size_t length);
 private:
   bufferlist m_bl;
   int m_op_flags;
@@ -203,28 +205,28 @@ protected:
   using typename ImageRequest<ImageCtxT>::ObjectRequests;
   using typename AbstractImageWriteRequest<ImageCtxT>::ObjectExtents;
 
-  virtual aio_type_t get_aio_type() const {
+  aio_type_t get_aio_type() const override {
     return AIO_TYPE_DISCARD;
   }
-  virtual const char *get_request_type() const {
+  const char *get_request_type() const override {
     return "aio_discard";
   }
 
-  virtual void prune_object_extents(ObjectExtents &object_extents) override;
+  void prune_object_extents(ObjectExtents &object_extents) override;
 
-  virtual void send_image_cache_request() override;
+  void send_image_cache_request() override;
 
-  virtual uint32_t get_object_cache_request_count(bool journaling) const override;
-  virtual void send_object_cache_requests(const ObjectExtents &object_extents,
-                                          uint64_t journal_tid);
+  uint32_t get_object_cache_request_count(bool journaling) const override;
+  void send_object_cache_requests(const ObjectExtents &object_extents,
+                                  uint64_t journal_tid) override;
 
-  virtual ObjectRequestHandle *create_object_request(
+  ObjectRequestHandle *create_object_request(
       const ObjectExtent &object_extent, const ::SnapContext &snapc,
-      Context *on_finish);
+      Context *on_finish) override;
 
-  virtual uint64_t append_journal_event(const ObjectRequests &requests,
-                                        bool synchronous);
-  virtual void update_stats(size_t length);
+  uint64_t append_journal_event(const ObjectRequests &requests,
+                                bool synchronous) override;
+  void update_stats(size_t length) override;
 };
 
 template <typename ImageCtxT = ImageCtx>
@@ -234,23 +236,23 @@ public:
     : ImageRequest<ImageCtxT>(image_ctx, aio_comp, {}) {
   }
 
-  virtual bool is_write_op() const {
+  bool is_write_op() const override {
     return true;
   }
 
 protected:
   using typename ImageRequest<ImageCtxT>::ObjectRequests;
 
-  virtual int clip_request() {
+  int clip_request() override {
     return 0;
   }
-  virtual void send_request();
-  virtual void send_image_cache_request() override;
+  void send_request() override;
+  void send_image_cache_request() override;
 
-  virtual aio_type_t get_aio_type() const {
+  aio_type_t get_aio_type() const override {
     return AIO_TYPE_FLUSH;
   }
-  virtual const char *get_request_type() const {
+  const char *get_request_type() const override {
     return "aio_flush";
   }
 };
index 79f5301a68311f99cd6c9753cda76597b99c0a0a..8bf10be4825d1566e7e050becc583aaf4d2ea55a 100644 (file)
@@ -58,8 +58,8 @@ public:
   void clear_require_lock_on_read();
 
 protected:
-  virtual void *_void_dequeue();
-  virtual void process(ImageRequest<ImageCtx> *req);
+  void *_void_dequeue() override;
+  void process(ImageRequest<ImageCtx> *req) override;
 
 private:
   typedef std::list<Context *> Contexts;
@@ -72,7 +72,7 @@ private:
                     ImageRequest<ImageCtx> *aio_image_request)
       : aio_work_queue(aio_work_queue), aio_image_request(aio_image_request) {
     }
-    virtual void finish(int r) override {
+    void finish(int r) override {
       aio_work_queue->handle_refreshed(r, aio_image_request);
     }
   };
@@ -83,7 +83,7 @@ private:
       : aio_work_queue(_aio_work_queue) {
     }
 
-    virtual void finish(int r) {
+    void finish(int r) override {
       aio_work_queue->handle_blocked_writes(r);
     }
   };
index 102e4763212dc5c53aafc612ffa33b19e28c98d8..0467dbb099a35c68fd90ddb4044f4fc08b6820ea 100644 (file)
@@ -73,14 +73,14 @@ public:
                 uint64_t objectno, uint64_t off, uint64_t len,
                 librados::snap_t snap_id,
                 Context *completion, bool hide_enoent);
-  virtual ~ObjectRequest() {}
+  ~ObjectRequest() override {}
 
   virtual void add_copyup_ops(librados::ObjectWriteOperation *wr) {};
 
-  void complete(int r);
+  void complete(int r) override;
 
   virtual bool should_complete(int r) = 0;
-  virtual void send() = 0;
+  void send() override = 0;
 
   bool has_parent() const {
     return m_has_parent;
@@ -129,8 +129,8 @@ public:
                     Extents& buffer_extents, librados::snap_t snap_id,
                     bool sparse, Context *completion, int op_flags);
 
-  virtual bool should_complete(int r);
-  virtual void send();
+  bool should_complete(int r) override;
+  void send() override;
   void guard_read();
 
   inline uint64_t get_offset() const {
@@ -149,11 +149,11 @@ public:
     return m_ext_map;
   }
 
-  const char *get_op_type() const {
+  const char *get_op_type() const override {
     return "read";
   }
 
-  bool pre_object_map_update(uint8_t *new_state) {
+  bool pre_object_map_update(uint8_t *new_state) override {
     return false;
   }
 
@@ -201,13 +201,13 @@ public:
                              uint64_t len, const ::SnapContext &snapc,
                              Context *completion, bool hide_enoent);
 
-  virtual void add_copyup_ops(librados::ObjectWriteOperation *wr)
+  void add_copyup_ops(librados::ObjectWriteOperation *wr) override
   {
     add_write_ops(wr);
   }
 
-  virtual bool should_complete(int r);
-  virtual void send();
+  bool should_complete(int r) override;
+  void send() override;
 
   /**
    * Writes go through the following state machine to deal with
@@ -289,23 +289,23 @@ public:
       m_write_data(data), m_op_flags(op_flags) {
   }
 
-  bool is_op_payload_empty() const {
+  bool is_op_payload_empty() const override {
     return (m_write_data.length() == 0);
   }
 
-  virtual const char *get_op_type() const {
+  const char *get_op_type() const override {
     return "write";
   }
 
-  virtual bool pre_object_map_update(uint8_t *new_state) {
+  bool pre_object_map_update(uint8_t *new_state) override {
     *new_state = OBJECT_EXISTS;
     return true;
   }
 
 protected:
-  virtual void add_write_ops(librados::ObjectWriteOperation *wr);
+  void add_write_ops(librados::ObjectWriteOperation *wr) override;
 
-  virtual void send_write();
+  void send_write() override;
 
 private:
   ceph::bufferlist m_write_data;
@@ -322,14 +322,14 @@ public:
       m_object_state(OBJECT_NONEXISTENT) {
   }
 
-  virtual const char* get_op_type() const {
+  const char* get_op_type() const override {
     if (has_parent()) {
       return "remove (trunc)";
     }
     return "remove";
   }
 
-  virtual bool pre_object_map_update(uint8_t *new_state) {
+  bool pre_object_map_update(uint8_t *new_state) override {
     if (has_parent()) {
       m_object_state = OBJECT_EXISTS;
     } else {
@@ -339,18 +339,18 @@ public:
     return true;
   }
 
-  virtual bool post_object_map_update() {
+  bool post_object_map_update() override {
     if (m_object_state == OBJECT_EXISTS) {
       return false;
     }
     return true;
   }
 
-  virtual void guard_write();
-  virtual void send_write();
+  void guard_write() override;
+  void send_write() override;
 
 protected:
-  virtual void add_write_ops(librados::ObjectWriteOperation *wr) {
+  void add_write_ops(librados::ObjectWriteOperation *wr) override {
     if (has_parent()) {
       wr->truncate(0);
     } else {
@@ -375,21 +375,21 @@ public:
       m_post_object_map_update(post_object_map_update) {
   }
 
-  virtual const char* get_op_type() const {
+  const char* get_op_type() const override {
     return "remove (trim)";
   }
 
-  virtual bool pre_object_map_update(uint8_t *new_state) {
+  bool pre_object_map_update(uint8_t *new_state) override {
     *new_state = OBJECT_PENDING;
     return true;
   }
 
-  virtual bool post_object_map_update() {
+  bool post_object_map_update() override {
     return m_post_object_map_update;
   }
 
 protected:
-  virtual void add_write_ops(librados::ObjectWriteOperation *wr) {
+  void add_write_ops(librados::ObjectWriteOperation *wr) override {
     wr->remove();
   }
 
@@ -406,11 +406,11 @@ public:
                                  completion, true) {
   }
 
-  virtual const char* get_op_type() const {
+  const char* get_op_type() const override {
     return "truncate";
   }
 
-  virtual bool pre_object_map_update(uint8_t *new_state) {
+  bool pre_object_map_update(uint8_t *new_state) override {
     if (!m_object_exist && !has_parent())
       *new_state = OBJECT_NONEXISTENT;
     else
@@ -418,10 +418,10 @@ public:
     return true;
   }
 
-  virtual void send_write();
+  void send_write() override;
 
 protected:
-  virtual void add_write_ops(librados::ObjectWriteOperation *wr) {
+  void add_write_ops(librados::ObjectWriteOperation *wr) override {
     wr->truncate(m_object_off);
   }
 };
@@ -435,17 +435,17 @@ public:
                                  snapc, completion, true) {
   }
 
-  virtual const char* get_op_type() const {
+  const char* get_op_type() const override {
     return "zero";
   }
 
-  virtual bool pre_object_map_update(uint8_t *new_state) {
+  bool pre_object_map_update(uint8_t *new_state) override {
     *new_state = OBJECT_EXISTS;
     return true;
   }
 
 protected:
-  virtual void add_write_ops(librados::ObjectWriteOperation *wr) {
+  void add_write_ops(librados::ObjectWriteOperation *wr) override {
     wr->zero(m_object_off, m_object_len);
   }
 };
index 0f81ac39be65e4a310695477121a8c19cd11a603..c497cab7bc6cfeba95f825022731325ac6395ce9 100644 (file)
@@ -14,13 +14,13 @@ namespace journal {
 
 class DisabledPolicy : public Policy {
 public:
-  virtual bool append_disabled() const {
+  bool append_disabled() const override {
     return true;
   }
-  virtual bool journal_disabled() const {
+  bool journal_disabled() const override {
     return true;
   }
-  virtual void allocate_tag_on_lock(Context *on_finish) {
+  void allocate_tag_on_lock(Context *on_finish) override {
     assert(false);
   }
 };
index 6b7fdd67b7427758c97bf14ca191cce4c3910b82..7587029640bc2726ab3a3c4ca09affd3d5074082 100644 (file)
@@ -68,7 +68,7 @@ private:
     C_OpOnComplete(Replay *replay, uint64_t op_tid)
       : replay(replay), op_tid(op_tid) {
     }
-    virtual void finish(int r) override {
+    void finish(int r) override {
       replay->handle_op_complete(op_tid, r);
     }
   };
@@ -80,7 +80,7 @@ private:
     C_AioModifyComplete(Replay *replay, Context *on_ready, Context *on_safe)
       : replay(replay), on_ready(on_ready), on_safe(on_safe) {
     }
-    virtual void finish(int r) {
+    void finish(int r) override {
       replay->handle_aio_modify_complete(on_ready, on_safe, r);
     }
   };
@@ -94,7 +94,7 @@ private:
       : replay(replay), on_flush_safe(on_flush_safe),
         on_safe_ctxs(on_safe_ctxs) {
     }
-    virtual void finish(int r) {
+    void finish(int r) override {
       replay->handle_aio_flush_complete(on_flush_safe, on_safe_ctxs, r);
     }
   };
index de3f48bb02ce527c7a5665631e08c9a7f4ced504..ec8d0148f03afd4f7d39d6abd94ea6212c3f216b 100644 (file)
@@ -18,13 +18,13 @@ public:
   StandardPolicy(ImageCtxT *image_ctx) : m_image_ctx(image_ctx) {
   }
 
-  virtual bool append_disabled() const {
+  bool append_disabled() const override {
     return false;
   }
-  virtual bool journal_disabled() const {
+  bool journal_disabled() const override {
     return false;
   }
-  virtual void allocate_tag_on_lock(Context *on_finish);
+  void allocate_tag_on_lock(Context *on_finish) override;
 
 private:
   ImageCtxT *m_image_ctx;
index 7ce4852697969cc5ceb88611463e55867df3f0ac..0a272bfd3d31f194476770b6387f8c2381ba6411 100644 (file)
@@ -34,11 +34,11 @@ struct C_DecodeTag : public Context {
       on_finish(on_finish) {
   }
 
-  virtual void complete(int r) override {
+  void complete(int r) override {
     on_finish->complete(process(r));
     Context::complete(0);
   }
-  virtual void finish(int r) override {
+  void finish(int r) override {
   }
 
   int process(int r);
@@ -64,11 +64,11 @@ struct C_DecodeTags : public Context {
       on_finish(on_finish) {
   }
 
-  virtual void complete(int r) {
+  void complete(int r) override {
     on_finish->complete(process(r));
     Context::complete(0);
   }
-  virtual void finish(int r) override {
+  void finish(int r) override {
   }
 
   int process(int r);
index b051379d0a315166f4bf232a2375674b07a39d62..11c420372ace5d5f51ac3ca665e56013fd58f6a1 100644 (file)
@@ -27,11 +27,11 @@ public:
       m_snap_id(snap_id), m_force(force) {
   }
 
-  virtual void send();
+  void send() override;
 
 protected:
-  virtual bool should_complete(int r) override;
-  virtual int filter_return_code(int r) const override{
+  bool should_complete(int r) override;
+  int filter_return_code(int r) const override{
     // never propagate an error back to the caller
     return 0;
   }
index 6629ad9cbfbbf290ed4b50070f1504224742b061..67f9bac11e5d70766831de833740a1db394f0a80 100644 (file)
@@ -23,13 +23,13 @@ public:
   {
   }
 
-  virtual void send() = 0;
+  void send() override = 0;
 
 protected:
   const uint64_t m_snap_id;
 
-  virtual bool should_complete(int r);
-  virtual int filter_return_code(int r) const {
+  bool should_complete(int r) override;
+  int filter_return_code(int r) const override {
     // never propagate an error back to the caller
     return 0;
   }
index dfe0bcc7e426c87773444263559fc950beae027a..5183940075a000447b13f9bc28a7ac91ccd940dc 100644 (file)
@@ -30,10 +30,10 @@ public:
   static void resize(ceph::BitVector<2> *object_map, uint64_t num_objs,
                      uint8_t default_state);
 
-  virtual void send();
+  void send() override;
 
 protected:
-  virtual void finish_request() override;
+  void finish_request() override;
 
 private:
   ceph::BitVector<2> *m_object_map;
index e68b78ac9a70059444eb76e291b486ee26c3db9a..31a0886883aac059f43df4b65e7f0a3da179c4de 100644 (file)
@@ -50,10 +50,10 @@ public:
       m_object_map(*object_map), m_ret_val(0) {
   }
 
-  virtual void send();
+  void send() override;
 
 protected:
-  virtual bool should_complete(int r);
+  bool should_complete(int r) override;
 
 private:
   State m_state;
index 3b196b13c574be9b8a3000373eec1f68dc53b869..6f9e85c48f182c358caefbd4ca0fb74cb2b1e4df 100644 (file)
@@ -52,12 +52,12 @@ public:
       m_snap_id(snap_id), m_next_snap_id(CEPH_NOSNAP) {
   }
 
-  virtual void send();
+  void send() override;
 
 protected:
-  virtual bool should_complete(int r);
+  bool should_complete(int r) override;
 
-  virtual int filter_return_code(int r) const {
+  int filter_return_code(int r) const override {
     if ((m_state == STATE_LOAD_MAP || m_state == STATE_REMOVE_MAP) &&
         r == -ENOENT) {
       return 0;
index dd9430058ea3ec02dcb75a77d57f02a2c3da20fc..47d7116cb4ba5e0268037bd365c4d376be22042e 100644 (file)
@@ -50,10 +50,10 @@ public:
     assert(snap_id != CEPH_NOSNAP);
   }
 
-  virtual void send();
+  void send() override;
 
 protected:
-  virtual bool should_complete(int r);
+  bool should_complete(int r) override;
 
 private:
   State m_state;
index 5f3ae5cd53f51568d5561ea15f6a7301925271e1..0bb9cd756e293f2f26b6c44fe46c609a826ac449 100644 (file)
@@ -42,10 +42,10 @@ public:
   {
   }
 
-  virtual void send();
+  void send() override;
 
 protected:
-  virtual void finish_request() override;
+  void finish_request() override;
 
 private:
   ceph::BitVector<2> &m_object_map;
index e9edaf904c500c2526e8261c46e7998c64e6ae56..7674dfc45ff8877b4a441843b74a89b519aae92f 100644 (file)
@@ -29,12 +29,12 @@ public:
                          uint64_t journal_op_tid, uint64_t features);
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r);
-  virtual bool can_affect_io() const override {
+  void send_op() override;
+  bool should_complete(int r) override;
+  bool can_affect_io() const override {
     return true;
   }
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::UpdateFeaturesEvent(op_tid, m_features, false);
   }
 
index feda681b255a2fbe7f22833b8346b20e2fc1109b..1c91b4dc72a2304598afdac61cd8d1e093d3beae 100644 (file)
@@ -28,12 +28,12 @@ public:
                         uint64_t journal_op_tid, uint64_t features);
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r);
-  virtual bool can_affect_io() const override {
+  void send_op() override;
+  bool should_complete(int r) override;
+  bool can_affect_io() const override {
     return true;
   }
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::UpdateFeaturesEvent(op_tid, m_features, true);
   }
 
index 55e33f40e7881d1a51de48710532afe0d06815bf..bc1531ddcc7f318add18225313d09e4ce0d18461 100644 (file)
@@ -28,10 +28,10 @@ public:
   }
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r);
+  void send_op() override;
+  bool should_complete(int r) override;
 
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::FlattenEvent(op_tid);
   }
 
index 0b51e11bf39ea889e853393d532e4ff015b2fc68..1d7f2a46afecc6f9a392480777082236b73b96f8 100644 (file)
@@ -23,10 +23,10 @@ public:
                         const std::string &key);
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r);
+  void send_op() override;
+  bool should_complete(int r) override;
 
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::MetadataRemoveEvent(op_tid, m_key);
   }
 
index d6abc3b3cc4e43f2fd5c66e144ea3645508c07ef..5f8daa2f1c3288c8efc979185ff2af58b108a673 100644 (file)
@@ -24,10 +24,10 @@ public:
                      const std::string &key, const std::string &value);
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r);
+  void send_op() override;
+  bool should_complete(int r) override;
 
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::MetadataSetEvent(op_tid, m_key, m_value);
   }
 
index 030df69d54d191a6d565c7717e5cfd471e091523..b46f87675236fcb73e126a2ec34b1c4b40eb4895 100644 (file)
@@ -34,10 +34,10 @@ public:
   {
   }
 
-  virtual void send();
+  void send() override;
 
 protected:
-  virtual bool should_complete(int r);
+  bool should_complete(int r) override;
 
 private:
   enum State {
index 28361872ce331aef06f5fe9ccdf4705303e2275d..1e43f3f4c0589d03992cae402a3e4dcfa1c4b331 100644 (file)
@@ -24,10 +24,10 @@ public:
   {
   }
 
-  virtual void send();
+  void send() override;
 
 protected:
-  virtual bool should_complete(int r);
+  bool should_complete(int r) override;
 
 private:
   /**
index 95f66588bb4def46539ae8815fb177744a9c8e0b..b0aa5640971e5a78ea9b98e200cfaed65633d394 100644 (file)
@@ -55,10 +55,10 @@ public:
                 const std::string &dest_name);
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r);
+  void send_op() override;
+  bool should_complete(int r) override;
 
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::RenameEvent(op_tid, m_dest_name);
   }
 
index 78993160bf6361cb6446532dceb17a3dc89a0dcd..8eaca29b1d1809834c2cee13ea331c62869cf802 100644 (file)
@@ -22,10 +22,10 @@ public:
   Request(ImageCtxT &image_ctx, Context *on_finish,
           uint64_t journal_op_tid = 0);
 
-  virtual void send();
+  void send();
 
 protected:
-  virtual void finish(int r) override;
+  void finish(int r) override;
   virtual void send_op() = 0;
 
   virtual bool can_affect_io() const {
@@ -58,7 +58,7 @@ protected:
 
   // NOTE: temporary until converted to new state machine format
   Context *create_context_finisher(int r);
-  virtual void finish_and_destroy(int r) override;
+  void finish_and_destroy(int r) override;
 
 private:
   struct C_AppendOpEvent : public Context {
@@ -67,7 +67,7 @@ private:
     C_AppendOpEvent(Request *request, Context *on_safe)
       : request(request), on_safe(on_safe) {
     }
-    virtual void finish(int r) override {
+    void finish(int r) override {
       if (r >= 0) {
         request->m_appended_op_event = true;
       }
@@ -81,7 +81,7 @@ private:
     C_CommitOpEvent(Request *request, int ret_val)
       : request(request), ret_val(ret_val) {
     }
-    virtual void finish(int r) override {
+    void finish(int r) override {
       request->handle_commit_op_event(r, ret_val);
       delete request;
     }
index 7b9ff6d8eb0f0057d4dbc01673900bff6e371943..4ec79c373be83fc2ffa97cf68e4e4eabf9d800d5 100644 (file)
@@ -28,7 +28,7 @@ public:
   ResizeRequest(ImageCtxT &image_ctx, Context *on_finish, uint64_t new_size,
                 bool allow_shrink, ProgressContext &prog_ctx, uint64_t journal_op_tid,
                 bool disable_journal);
-  virtual ~ResizeRequest();
+  ~ResizeRequest() override;
 
   inline bool shrinking() const {
     return (m_shrink_size_visible && m_new_size < m_original_size);
@@ -38,17 +38,17 @@ public:
     return m_new_size;
   }
 
-  virtual void send();
+  void send() override;
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r) {
+  void send_op() override;
+  bool should_complete(int r) override {
     return true;
   }
-  virtual bool can_affect_io() const override {
+  bool can_affect_io() const override {
     return true;
   }
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::ResizeEvent(op_tid, m_new_size);
   }
 
index 164582604095b48bb3ccde89a796c9ff2acf8d4a..e1e4beb550346e9c959a7c02155d3cc9f9bd118d 100644 (file)
@@ -66,14 +66,14 @@ public:
                         bool skip_object_map);
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r) {
+  void send_op() override;
+  bool should_complete(int r) override {
     return true;
   }
-  virtual bool can_affect_io() const override {
+  bool can_affect_io() const override {
     return true;
   }
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::SnapCreateEvent(op_tid, m_snap_name, m_snap_namespace);
   }
 
index bcd205b3d16b7eb6403de0c57fdc71f5a4c06bf9..09622a459602f33a468e26108e99d4726c5f420a 100644 (file)
@@ -23,10 +23,10 @@ public:
                       uint64_t limit);
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r);
+  void send_op() override;
+  bool should_complete(int r) override;
 
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::SnapLimitEvent(op_tid, m_snap_limit);
   }
 
index b905ff50f4a09c606067e94b4a0955d3a87cc902..764da65da0c411f4d2890cc0974be94affa636e2 100644 (file)
@@ -42,10 +42,10 @@ public:
                         const std::string &snap_name);
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r);
+  void send_op() override;
+  bool should_complete(int r) override;
 
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::SnapProtectEvent(op_tid, m_snap_name);
   }
 
index 39123ff8ee8775aa92cb587d01e23dd9d0a898f3..40c12c5c923a03237daa83f676df57cfb8686305 100644 (file)
@@ -60,10 +60,10 @@ public:
                        const std::string &snap_name, uint64_t snap_id);
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r);
+  void send_op() override;
+  bool should_complete(int r) override;
 
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::SnapRemoveEvent(op_tid, m_snap_name);
   }
 
index 0b512ecb57585d087764d5a4b32d3092cc43aa50..697772e024b7e4e164fd0b8cc8d1cfcb0ca2a583 100644 (file)
@@ -41,11 +41,11 @@ public:
   SnapshotRenameRequest(ImageCtxT &image_ctx, Context *on_finish,
                         uint64_t snap_id, const std::string &snap_name);
 
-  virtual journal::Event create_event(uint64_t op_tid) const;
+  journal::Event create_event(uint64_t op_tid) const override;
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r);
+  void send_op() override;
+  bool should_complete(int r) override;
 
 private:
   uint64_t m_snap_id;
index 135ba97945518acfd2a4eb440665f669487cf12c..5d1cb69e85c5a5c372c1abafc468c3ac059b86dd 100644 (file)
@@ -59,15 +59,15 @@ public:
   SnapshotRollbackRequest(ImageCtxT &image_ctx, Context *on_finish,
                           const std::string &snap_name, uint64_t snap_id,
                           uint64_t snap_size, ProgressContext &prog_ctx);
-  virtual ~SnapshotRollbackRequest();
+  ~SnapshotRollbackRequest() override;
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r) {
+  void send_op() override;
+  bool should_complete(int r) override {
     return true;
   }
 
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::SnapRollbackEvent(op_tid, m_snap_name);
   }
 
index c9f5b335ade9fefd6322a2655ea0f45e97f90ff3..7930592f57eec2c486607ffb1ec193dfb44deadb 100644 (file)
@@ -53,17 +53,17 @@ public:
                           const std::string &snap_name);
 
 protected:
-  virtual void send_op();
-  virtual bool should_complete(int r);
+  void send_op() override;
+  bool should_complete(int r) override;
 
-  virtual int filter_return_code(int r) const {
+  int filter_return_code(int r) const override {
     if (m_ret_val < 0) {
       return m_ret_val;
     }
     return 0;
   }
 
-  virtual journal::Event create_event(uint64_t op_tid) const {
+  journal::Event create_event(uint64_t op_tid) const override {
     return journal::SnapUnprotectEvent(op_tid, m_snap_name);
   }
 
index 814d1802309787139528c2a454cecb5080dbab8b..5eb9fdffe3868b47f58a002b5c5177f49eda6be4 100644 (file)
@@ -24,7 +24,7 @@ public:
                            prog_ctx);
   }
 
-  virtual void send();
+  void send() override;
 
 protected:
   /**
@@ -77,7 +77,7 @@ protected:
     STATE_FINISHED
   };
 
-  virtual bool should_complete(int r);
+  bool should_complete(int r) override;
 
   State m_state;
 
index c45e9ac90f66861a483a699287ccb600bdc9efe2..609c2ada739d7b8f35a4d4581989db9373dd7c2b 100644 (file)
@@ -37,7 +37,7 @@ private:
     C_AioNotify(Notifier *notifier, Context *on_finish)
       : notifier(notifier), on_finish(on_finish) {
     }
-    virtual void finish(int r) override {
+    void finish(int r) override {
       notifier->handle_notify(r, on_finish);
     }
   };
index 0f11ab8885a73cf37a166632a2f99abe6e80db5c..504f8e4e781b428ee5185339ed4464ff71a4123d 100644 (file)
@@ -26,7 +26,7 @@ struct C_NotifyAck : public Context {
   bufferlist out;
 
   C_NotifyAck(Watcher *watcher, uint64_t notify_id, uint64_t handle);
-  void finish(int r);
+  void finish(int r) override;
 };
 
 template <typename Watcher>
index 5cb5ee57eeb4a19728c13da97f07b67f55207e1c..cbc7739df5b4cdf05cda82a3ca655a09121d4c90 100644 (file)
@@ -36,31 +36,31 @@ public:
   void start();
 
   /// Should only be called by StopThreadAction
-  void stop();
+  void stop() override;
 
   void join();
 
   void send(Action::ptr action);
 
-  void add_pending(PendingIO::ptr io);
+  void add_pending(PendingIO::ptr io) override;
 
-  void remove_pending(PendingIO::ptr io);
+  void remove_pending(PendingIO::ptr io) override;
 
-  librbd::Image* get_image(imagectx_id_t imagectx_id);
+  librbd::Image* get_image(imagectx_id_t imagectx_id) override;
 
-  void put_image(imagectx_id_t imagectx_id, librbd::Image* image);
+  void put_image(imagectx_id_t imagectx_id, librbd::Image* image) override;
 
-  void erase_image(imagectx_id_t imagectx_id);
+  void erase_image(imagectx_id_t imagectx_id) override;
 
-  librbd::RBD* rbd();
+  librbd::RBD* rbd() override;
 
-  librados::IoCtx* ioctx();
+  librados::IoCtx* ioctx() override;
 
-  void set_action_complete(action_id_t id);
+  void set_action_complete(action_id_t id) override;
 
-  bool readonly() const;
+  bool readonly() const override;
 
-  rbd_loc map_image_name(std::string image_name, std::string snap_name) const;
+  rbd_loc map_image_name(std::string image_name, std::string snap_name) const override;
 
 private:
   void run();
index df5dde48459938c67a60031fd2da327b073c5d81..b191448f62633efb45ce4320b0eb6c9599f81c1d 100644 (file)
@@ -127,19 +127,19 @@ public:
   explicit TypedAction(const ActionType &action) : m_action(action) {
   }
 
-  virtual action_id_t id() const {
+  action_id_t id() const override {
     return m_action.id;
   }
 
-  virtual thread_id_t thread_id() const {
+  thread_id_t thread_id() const override {
     return m_action.thread_id;
   }
 
-  virtual const action::Dependencies& predecessors() const {
+  const action::Dependencies& predecessors() const override {
     return m_action.dependencies;
   }
 
-  virtual std::ostream& dump(std::ostream& o) const {
+  std::ostream& dump(std::ostream& o) const override {
     o << get_action_name() << ": ";
     ceph::JSONFormatter formatter(false);
     formatter.open_object_section("");
@@ -165,13 +165,13 @@ public:
     : TypedAction<action::StartThreadAction>(action) {
   }
 
-  virtual bool is_start_thread() {
+  bool is_start_thread() override {
     return true;
   }
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "StartThreadAction";
   }
 };
@@ -182,10 +182,10 @@ public:
     : TypedAction<action::StopThreadAction>(action) {
   }
 
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "StartThreadAction";
   }
 };
@@ -197,10 +197,10 @@ public:
     : TypedAction<action::AioReadAction>(action) {
   }
 
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "AioReadAction";
   }
 };
@@ -212,10 +212,10 @@ public:
     : TypedAction<action::ReadAction>(action) {
   }
 
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "ReadAction";
   }
 };
@@ -227,10 +227,10 @@ public:
     : TypedAction<action::AioWriteAction>(action) {
   }
 
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "AioWriteAction";
   }
 };
@@ -242,10 +242,10 @@ public:
     : TypedAction<action::WriteAction>(action) {
   }
 
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "WriteAction";
   }
 };
@@ -257,10 +257,10 @@ public:
     : TypedAction<action::AioDiscardAction>(action) {
   }
 
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "AioDiscardAction";
   }
 };
@@ -272,10 +272,10 @@ public:
     : TypedAction<action::DiscardAction>(action) {
   }
 
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "DiscardAction";
   }
 };
@@ -287,10 +287,10 @@ public:
     : TypedAction<action::OpenImageAction>(action) {
   }
 
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "OpenImageAction";
   }
 };
@@ -302,10 +302,10 @@ public:
     : TypedAction<action::CloseImageAction>(action) {
   }
 
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "CloseImageAction";
   }
 };
@@ -316,10 +316,10 @@ public:
     : TypedAction<action::AioOpenImageAction>(action) {
   }
 
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "AioOpenImageAction";
   }
 };
@@ -331,10 +331,10 @@ public:
     : TypedAction<action::AioCloseImageAction>(action) {
   }
 
-  virtual void perform(ActionCtx &ctx);
+  void perform(ActionCtx &ctx) override;
 
 protected:
-  virtual const char *get_action_name() const {
+  const char *get_action_name() const override {
     return "AioCloseImageAction";
   }
 };
index 5f19648b9e64b1e7a631fc5dd2784bd2457cfc7d..d8f586186508a55a48f2ecc698964cf5a5c3d47f 100644 (file)
@@ -117,9 +117,9 @@ public:
     : IO(ionum, start_time, thread_id, io_set_t()) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 };
 
 class StopThreadIO : public IO {
@@ -131,9 +131,9 @@ public:
     : IO(ionum, start_time, thread_id, deps) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 };
 
 class ReadIO : public IO {
@@ -151,9 +151,9 @@ public:
       m_length(length) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 
 private:
   imagectx_id_t m_imagectx;
@@ -176,9 +176,9 @@ public:
       m_length(length) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 
 private:
   imagectx_id_t m_imagectx;
@@ -201,9 +201,9 @@ public:
       m_length(length) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 
 private:
   imagectx_id_t m_imagectx;
@@ -226,9 +226,9 @@ public:
       m_length(length) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 
 private:
   imagectx_id_t m_imagectx;
@@ -251,9 +251,9 @@ public:
       m_length(length) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 
 private:
   imagectx_id_t m_imagectx;
@@ -276,9 +276,9 @@ public:
       m_length(length) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 
 private:
   imagectx_id_t m_imagectx;
@@ -303,13 +303,13 @@ public:
       m_readonly(readonly) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
   imagectx_id_t imagectx() const {
     return m_imagectx;
   }
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 
 private:
   imagectx_id_t m_imagectx;
@@ -329,13 +329,13 @@ public:
       m_imagectx(imagectx) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
   imagectx_id_t imagectx() const {
     return m_imagectx;
   }
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 
 private:
   imagectx_id_t m_imagectx;
@@ -358,13 +358,13 @@ public:
       m_readonly(readonly) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
   imagectx_id_t imagectx() const {
     return m_imagectx;
   }
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 
 private:
   imagectx_id_t m_imagectx;
@@ -384,13 +384,13 @@ public:
       m_imagectx(imagectx) {
   }
 
-  virtual void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl) const override;
 
   imagectx_id_t imagectx() const {
     return m_imagectx;
   }
 
-  void write_debug(std::ostream& out) const;
+  void write_debug(std::ostream& out) const override;
 
 private:
   imagectx_id_t m_imagectx;
index de27ef8b1edb2be48b052c6ae97ed17c369992e6..b5950ce66a9d196b20c98ac29c3ad2148b47e8fd 100644 (file)
@@ -82,7 +82,7 @@ struct ObjectRequest<librbd::MockTestImageCtx> : public ObjectRequestHandle {
     assert(s_instance == nullptr);
     s_instance = this;
   }
-  ~ObjectRequest() {
+  ~ObjectRequest() override {
     s_instance = nullptr;
   }
 
@@ -112,7 +112,7 @@ struct ObjectReadRequest<librbd::MockTestImageCtx> : public ObjectRequest<librbd
     assert(s_instance == nullptr);
     s_instance = this;
   }
-  ~ObjectReadRequest() {
+  ~ObjectReadRequest() override {
     s_instance = nullptr;
   }
 
index 34bd9c055f5ad21e64021336fd40150f43bcaa3a..faa20382f651724cde270264b3a661d17ce11c52 100644 (file)
@@ -20,8 +20,8 @@ public:
 
   static std::string get_temp_image_name();
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
 
   int open_image(const std::string &image_name, librbd::ImageCtx **ictx);
   void close_image(librbd::ImageCtx *ictx);
index cf606359309236e527c47815e9715df995cd2782..6146a3686107233045b7040d971e638208c38035 100644 (file)
@@ -64,8 +64,8 @@ public:
   static void SetUpTestCase();
   static void TearDownTestCase();
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
 
   ::testing::NiceMock<librados::MockTestMemRadosClient> &get_mock_rados_client() {
     return *s_mock_rados_client;
index 6c081c4b3b16813e73ee72b5a8884bb192abb8f9..43da46f4ce640c11845a1dec9d83475a1416386a 100644 (file)
@@ -36,7 +36,7 @@ public:
     m_cluster_watcher.reset(new ClusterWatcher(m_cluster, m_lock));
   }
 
-  ~TestClusterWatcher() {
+  ~TestClusterWatcher() override {
     m_cluster->wait_for_latest_osdmap();
     for (auto& pool : m_pools) {
       EXPECT_EQ(0, m_cluster->pool_delete(pool.c_str()));
index 433873b8586b85a887595f0e05e2ced0bf9feb33..201934e3dcaada5884721f4e5fa76416993cbe4c 100644 (file)
@@ -48,7 +48,7 @@ TestPoolWatcher() : m_lock("TestPoolWatcherLock"),
     EXPECT_EQ("", connect_cluster_pp(*m_cluster));
   }
 
-  ~TestPoolWatcher() {
+  ~TestPoolWatcher() override {
     m_cluster->wait_for_latest_osdmap();
     for (auto& pool : m_pools) {
       EXPECT_EQ(0, m_cluster->pool_delete(pool.c_str()));
index ce751409148867814b789d6eba9cea3ca3305a02..41526dbdc2217e7bab0bcea8ac1cf5a4ecf6b83d 100644 (file)
@@ -26,8 +26,8 @@ public:
   static void SetUpTestCase();
   static void TearDownTestCase();
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
 
   librados::IoCtx m_local_io_ctx;
   librados::IoCtx m_remote_io_ctx;
index 0952f9c3b743950e6e8066062ee285abc960fc0e..77a36ddc6d8c031d0abd9650789118d83e2844a8 100644 (file)
@@ -39,8 +39,8 @@ public:
   static void SetUpTestCase();
   static void TearDownTestCase();
 
-  virtual void SetUp();
-  virtual void TearDown();
+  void SetUp() override;
+  void TearDown() override;
 
   void expect_test_features(librbd::MockImageCtx &mock_image_ctx);
 
index ba7d90bc96b0c12f35455b0724a9a8839c5b60cf..85ccc85b3810e04fbaaeb9015ffcf78924d3366e 100644 (file)
@@ -25,7 +25,7 @@ public:
   }
 
 protected:
-  virtual int overflow (int c);
+  int overflow (int c) override;
 
 private:
   size_t m_indent;
index 0023d431dfed56fa6275877e00c66871639d5b84..bc23a2f0c58c76e34865175b8b9f9b84a84825c7 100644 (file)
@@ -54,7 +54,7 @@ struct ProgressContext : public librbd::ProgressContext {
     : operation(o), progress(!no_progress), last_pc(0) {
   }
 
-  int update_progress(uint64_t offset, uint64_t total);
+  int update_progress(uint64_t offset, uint64_t total) override;
   void finish();
   void fail();
 };
index 64d0671dfb251609c18a5d1a18d1525050b62081..ff5f4e535f4d615cbe0fa5c452c1801f21d2f3f5 100644 (file)
@@ -68,7 +68,7 @@ private:
   public:
     ImageDeleterThread(ImageDeleter *image_deleter) :
       m_image_deleter(image_deleter) {}
-    void *entry() {
+    void *entry() override {
       m_image_deleter->run();
       return 0;
     }
index 41c3fac37c9ee5f6d708bca0206c13a6f272fa53..da3d107a5f31312c8238450e08a43e5a47e82747 100644 (file)
@@ -244,15 +244,15 @@ private:
       : img_replayer(img_replayer) {
     }
 
-    virtual void handle_close() {
+    void handle_close() override {
       img_replayer->on_stop_journal_replay();
     }
 
-    virtual void handle_promoted() {
+    void handle_promoted() override {
       img_replayer->on_stop_journal_replay(0, "force promoted");
     }
 
-    virtual void handle_resync() {
+    void handle_resync() override {
       img_replayer->resync_image();
     }
   };
@@ -263,8 +263,8 @@ private:
       replayer(replayer) {
     }
 
-    virtual void update_progress(const std::string &description,
-                                bool flush = true);
+    void update_progress(const std::string &description,
+                                bool flush = true) override;
   private:
     ImageReplayer<ImageCtxT> *replayer;
   };
@@ -334,7 +334,7 @@ private:
 
     RemoteJournalerListener(ImageReplayer *replayer) : replayer(replayer) { }
 
-    void handle_update(::journal::JournalMetadata *);
+    void handle_update(::journal::JournalMetadata *) override;
   } m_remote_listener;
 
   struct C_ReplayCommitted : public Context {
@@ -345,7 +345,7 @@ private:
                       ReplayEntry &&replay_entry)
       : replayer(replayer), replay_entry(std::move(replay_entry)) {
     }
-    virtual void finish(int r) {
+    void finish(int r) override {
       replayer->handle_process_entry_safe(replay_entry, r);
     }
   };
index 97bad5471c4a3c25d73badf254d0c326b9c28f0e..42bbcc51d4fbcba64142ed762069a8bebad75790 100644 (file)
@@ -51,10 +51,10 @@ public:
             Journaler *journaler, MirrorPeerClientMeta *client_meta,
             ContextWQ *work_queue, Context *on_finish,
             ProgressContext *progress_ctx = nullptr);
-  ~ImageSync();
+  ~ImageSync() override;
 
-  void send();
-  void cancel();
+  void send() override;
+  void cancel() override;
 
 private:
   /**
index 76062b2098a60b27da838f0ac99246536c74da72..abe01e4369555ec491b4ca49355d15924fa3c198 100644 (file)
@@ -49,7 +49,7 @@ public:
   typedef librbd::journal::MirrorPeerClientMeta MirrorPeerClientMeta;
 
   ImageSyncThrottler();
-  ~ImageSyncThrottler();
+  ~ImageSyncThrottler() override;
   ImageSyncThrottler(const ImageSyncThrottler&) = delete;
   ImageSyncThrottler& operator=(const ImageSyncThrottler&) = delete;
 
@@ -74,9 +74,9 @@ private:
 
   void handle_sync_finished(C_SyncHolder *sync_holder);
 
-  const char **get_tracked_conf_keys() const;
+  const char **get_tracked_conf_keys() const override;
   void handle_conf_change(const struct md_config_t *conf,
-                          const std::set<std::string> &changed);
+                          const std::set<std::string> &changed) override;
 
   uint32_t m_max_concurrent_syncs;
   Mutex m_lock;
index 8a2c6f72804084f4c432d0ac8ee2455a5c5abbfd..8d5fd5dae85f7dc26f9fcee37a044c35717c2bf3 100644 (file)
@@ -104,7 +104,7 @@ private:
     }
 
   protected:
-    virtual void post_acquire_lock_handler(int r, Context *on_finish) {
+    void post_acquire_lock_handler(int r, Context *on_finish) {
       if (r == 0) {
         // lock is owned at this point
         Mutex::Locker locker(Parent::m_lock);
@@ -112,12 +112,12 @@ private:
       }
       watcher->handle_post_acquire_leader_lock(r, on_finish);
     }
-    virtual void pre_release_lock_handler(bool shutting_down,
-                                          Context *on_finish) {
+    void pre_release_lock_handler(bool shutting_down,
+                                  Context *on_finish) {
       watcher->handle_pre_release_leader_lock(on_finish);
     }
-    virtual void post_release_lock_handler(bool shutting_down, int r,
-                                           Context *on_finish) {
+    void post_release_lock_handler(bool shutting_down, int r,
+                                   Context *on_finish) {
       watcher->handle_post_release_leader_lock(r, on_finish);
     }
   private:
@@ -146,7 +146,7 @@ private:
       : leader_watcher(leader_watcher) {
     }
 
-    virtual void finish(int r) {
+    void finish(int r) override {
       leader_watcher->handle_get_locker(r, locker);
     }
   };
@@ -220,7 +220,7 @@ private:
   void handle_post_release_leader_lock(int r, Context *on_finish);
 
   void handle_notify(uint64_t notify_id, uint64_t handle,
-                     uint64_t notifier_id, bufferlist &bl);
+                     uint64_t notifier_id, bufferlist &bl) override;
 
   void handle_heartbeat(Context *on_ack);
   void handle_lock_acquired(Context *on_ack);
index 0349e97abde217a0bc5bf97b444d7b412108bcc8..f9d9227b3c1f36c27e997b38e7888714e1c580c0 100644 (file)
@@ -17,8 +17,8 @@ public:
   void shut_down(Context *on_finish);
 
 protected:
-  virtual void handle_notify(uint64_t notify_id, uint64_t handle,
-                            uint64_t notifier_id, bufferlist &bl);
+  void handle_notify(uint64_t notify_id, uint64_t handle,
+                     uint64_t notifier_id, bufferlist &bl) override;
 };
 
 } // namespace mirror
index 42db5ec964db55c3c3b2a3814a3fd498ce55cbfc..36dc074320f41558b247d867e780f85cd6e4cdfa 100644 (file)
@@ -99,7 +99,7 @@ private:
     Replayer *m_replayer;
   public:
     ReplayerThread(Replayer *replayer) : m_replayer(replayer) {}
-    void *entry() {
+    void *entry() override {
       m_replayer->run();
       return 0;
     }
@@ -111,11 +111,11 @@ private:
     }
 
   protected:
-    virtual void post_acquire_handler(Context *on_finish) {
+    void post_acquire_handler(Context *on_finish) override {
       m_replayer->handle_post_acquire_leader(on_finish);
     }
 
-    virtual void pre_release_handler(Context *on_finish) {
+    void pre_release_handler(Context *on_finish) override {
       m_replayer->handle_pre_release_leader(on_finish);
     }
 
index 6b4ed215a0f26c8f9bbe83a629f91ae37f173dd5..0d7017e705350642252fad9b189a97a2121825de 100644 (file)
@@ -75,10 +75,10 @@ public:
                    const std::string &remote_mirror_uuid, Journaler *journaler,
                    MirrorPeerClientMeta *client_meta, Context *on_finish,
                    bool *do_resync, ProgressContext *progress_ctx = nullptr);
-  ~BootstrapRequest();
+  ~BootstrapRequest() override;
 
-  void send();
-  void cancel();
+  void send() override;
+  void cancel() override;
 
 private:
   /**
index 85dfe9b28316f96b491ac6a234832c951d7c3efd..4be826aa127ae1818cf3dacc66b38db2f009ef73 100644 (file)
@@ -55,8 +55,8 @@ public:
                    MirrorPeerSyncPoint *sync_point, Context *on_finish,
                   ProgressContext *progress_ctx = nullptr);
 
-  void send();
-  void cancel();
+  void send() override;
+  void cancel() override;
 
 private:
   /**
index 77f77722877c14f63039bd9546e5beb8e201afcb..bd8b7ef932c5eb2e45514be3aa8bc2831603075e 100644 (file)
@@ -50,8 +50,8 @@ public:
                       librbd::journal::MirrorPeerClientMeta *client_meta,
                       ContextWQ *work_queue, Context *on_finish);
 
-  void send();
-  void cancel();
+  void send() override;
+  void cancel() override;
 
 private:
   /**