]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add override in mds subsystem 13438/head
authorliuchang0812 <liuchang0812@gmail.com>
Wed, 15 Feb 2017 13:26:08 +0000 (21:26 +0800)
committerliuchang0812 <liuchang0812@gmail.com>
Wed, 15 Feb 2017 13:26:08 +0000 (21:26 +0800)
Fixes: http://tracker.ceph.com/issues/18922
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
20 files changed:
src/mds/Beacon.cc
src/mds/CDir.cc
src/mds/CInode.cc
src/mds/DamageTable.cc
src/mds/Locker.cc
src/mds/MDBalancer.cc
src/mds/MDCache.cc
src/mds/MDLog.cc
src/mds/MDSDaemon.cc
src/mds/MDSRank.cc
src/mds/MDSTable.cc
src/mds/MDSTableClient.cc
src/mds/MDSTableServer.cc
src/mds/Migrator.cc
src/mds/RecoveryQueue.cc
src/mds/ScrubStack.cc
src/mds/Server.cc
src/mds/SessionMap.cc
src/mds/SnapRealm.cc
src/mds/StrayManager.cc

index c8a88de7170b1e322badce909db8bac8d1a287f7..210de4ee6c7c86caa055c0d2963c0ea601a6feb8 100644 (file)
@@ -36,7 +36,7 @@
 class Beacon::C_MDS_BeaconSender : public Context {
 public:
   explicit C_MDS_BeaconSender(Beacon *beacon_) : beacon(beacon_) {}
-  void finish(int r) {
+  void finish(int r) override {
     assert(beacon->lock.is_locked_by_me());
     beacon->sender = NULL;
     beacon->_send();
index 6ad74bdf30db1b464258a2c4fbb229d374ba213f..1faa02e4e937018f9d313f11140ed41dba36c96f 100644 (file)
@@ -49,7 +49,7 @@ class CDirContext : public MDSInternalContextBase
 {
 protected:
   CDir *dir;
-  MDSRank* get_mds() {return dir->cache->mds;}
+  MDSRank* get_mds() override {return dir->cache->mds;}
 
 public:
   explicit CDirContext(CDir *d) : dir(d) {
@@ -62,7 +62,7 @@ class CDirIOContext : public MDSIOContextBase
 {
 protected:
   CDir *dir;
-  MDSRank* get_mds() {return dir->cache->mds;}
+  MDSRank* get_mds() override {return dir->cache->mds;}
 
 public:
   explicit CDirIOContext(CDir *d) : dir(d) {
@@ -1494,7 +1494,7 @@ public:
 
   C_IO_Dir_OMAP_Fetched(CDir *d, MDSInternalContextBase *f) :
     CDirIOContext(d), fin(f), ret1(0), ret2(0), ret3(0) { }
-  void finish(int r) {
+  void finish(int r) override {
     // check the correctness of backtrace
     if (r >= 0 && ret3 != -ECANCELED)
       dir->inode->verify_diri_backtrace(btbl, ret3);
@@ -1975,7 +1975,7 @@ class C_IO_Dir_Committed : public CDirIOContext {
   version_t version;
 public:
   C_IO_Dir_Committed(CDir *d, version_t v) : CDirIOContext(d), version(v) { }
-  void finish(int r) {
+  void finish(int r) override {
     dir->_committed(r, version);
   }
 };
@@ -2763,7 +2763,7 @@ CDir *CDir::get_frozen_tree_root()
 class C_Dir_AuthUnpin : public CDirContext {
   public:
   explicit C_Dir_AuthUnpin(CDir *d) : CDirContext(d) {}
-  void finish(int r) {
+  void finish(int r) override {
     dir->auth_unpin(dir->get_inode());
   }
 };
index cdc9832d44813e255dad9d0960bb87ab33aacf26..1eebf16456ad734d945878c5bec9d1cf9eb9e80d 100644 (file)
@@ -58,7 +58,7 @@ class CInodeIOContext : public MDSIOContextBase
 {
 protected:
   CInode *in;
-  MDSRank *get_mds() {return in->mdcache->mds;}
+  MDSRank *get_mds() override {return in->mdcache->mds;}
 public:
   explicit CInodeIOContext(CInode *in_) : in(in_) {
     assert(in != NULL);
@@ -943,7 +943,7 @@ struct C_IO_Inode_Stored : public CInodeIOContext {
   version_t version;
   Context *fin;
   C_IO_Inode_Stored(CInode *i, version_t v, Context *f) : CInodeIOContext(i), version(v), fin(f) {}
-  void finish(int r) {
+  void finish(int r) override {
     in->_stored(r, version, fin);
   }
 };
@@ -1033,7 +1033,7 @@ struct C_IO_Inode_Fetched : public CInodeIOContext {
   bufferlist bl, bl2;
   Context *fin;
   C_IO_Inode_Fetched(CInode *i, Context *f) : CInodeIOContext(i), fin(f) {}
-  void finish(int r) {
+  void finish(int r) override {
     // Ignore 'r', because we fetch from two places, so r is usually ENOENT
     in->_fetched(bl, bl2, fin);
   }
@@ -1126,7 +1126,7 @@ struct C_IO_Inode_StoredBacktrace : public CInodeIOContext {
   version_t version;
   Context *fin;
   C_IO_Inode_StoredBacktrace(CInode *i, version_t v, Context *f) : CInodeIOContext(i), version(v), fin(f) {}
-  void finish(int r) {
+  void finish(int r) override {
     in->_stored_backtrace(r, version, fin);
   }
 };
@@ -1866,8 +1866,8 @@ protected:
   CInode *in;
   CDir *dir;
   MutationRef mut;
-  MDSRank *get_mds() {return in->mdcache->mds;}
-  void finish(int r) {
+  MDSRank *get_mds() override {return in->mdcache->mds;}
+  void finish(int r) override {
     in->_finish_frag_update(dir, mut);
   }    
 
@@ -4016,7 +4016,7 @@ next:
       return true;
     }
 
-    void _done() {
+    void _done() override {
       if ((!results->raw_stats.checked || results->raw_stats.passed) &&
          (!results->backtrace.checked || results->backtrace.passed) &&
          (!results->inode.checked || results->inode.passed))
index c19f4e2c93ee14eb7ff510259c3ab786f68ba168..3e651097d02735d5bfb2f05cf23bfb55550ee1dd 100644 (file)
@@ -38,12 +38,12 @@ class DirFragDamage : public DamageEntry
     : ino(ino_), frag(frag_)
   {}
 
-  virtual damage_entry_type_t get_type() const
+  damage_entry_type_t get_type() const override
   {
     return DAMAGE_ENTRY_DIRFRAG;
   }
 
-  void dump(Formatter *f) const
+  void dump(Formatter *f) const override
   {
     f->open_object_section("dir_frag_damage");
     f->dump_string("damage_type", "dir_frag");
@@ -74,12 +74,12 @@ class DentryDamage : public DamageEntry
     : ino(ino_), frag(frag_), dname(dname_), snap_id(snap_id_)
   {}
 
-  virtual damage_entry_type_t get_type() const
+  damage_entry_type_t get_type() const override
   {
     return DAMAGE_ENTRY_DENTRY;
   }
 
-  void dump(Formatter *f) const
+  void dump(Formatter *f) const override
   {
     f->open_object_section("dentry_damage");
     f->dump_string("damage_type", "dentry");
@@ -105,12 +105,12 @@ class BacktraceDamage : public DamageEntry
     : ino(ino_)
   {}
 
-  virtual damage_entry_type_t get_type() const
+  damage_entry_type_t get_type() const override
   {
     return DAMAGE_ENTRY_BACKTRACE;
   }
 
-  void dump(Formatter *f) const
+  void dump(Formatter *f) const override
   {
     f->open_object_section("backtrace_damage");
     f->dump_string("damage_type", "backtrace");
index 95a1f24d08ce3426754447bd4fe72a0a6450d886..ada7611b4a0460d5463129f18ed1a73c7637f253 100644 (file)
@@ -59,7 +59,7 @@ static ostream& _prefix(std::ostream *_dout, MDSRank *mds) {
 class LockerContext : public MDSInternalContextBase {
 protected:
   Locker *locker;
-  MDSRank *get_mds()
+  MDSRank *get_mds() override
   {
     return locker->mds;
   }
@@ -73,7 +73,7 @@ public:
 class LockerLogContext : public MDSLogContextBase {
 protected:
   Locker *locker;
-  MDSRank *get_mds()
+  MDSRank *get_mds() override
   {
     return locker->mds;
   }
@@ -1006,7 +1006,7 @@ public:
     assert(locker->mds->mds_lock.is_locked_by_me());
     p->get(MDSCacheObject::PIN_PTRWAITER);    
   }
-  void finish(int r) {
+  void finish(int r) override {
     p->put(MDSCacheObject::PIN_PTRWAITER);
     locker->try_eval(p, mask);
   }
@@ -1717,7 +1717,7 @@ public:
       ack(ac) {
     in->get(CInode::PIN_PTRWAITER);
   }
-  void finish(int r) {
+  void finish(int r) override {
     locker->file_update_finish(in, mut, share, client, cap, ack);
   }
 };
@@ -2094,7 +2094,7 @@ public:
   C_MDL_RequestInodeFileCaps(Locker *l, CInode *i) : LockerContext(l), in(i) {
     in->get(CInode::PIN_PTRWAITER);
   }
-  void finish(int r) {
+  void finish(int r) override {
     in->put(CInode::PIN_PTRWAITER);
     if (!in->is_auth())
       locker->request_inode_file_caps(in);
@@ -2171,7 +2171,7 @@ public:
   {
     in->get(CInode::PIN_PTRWAITER);
   }
-  void finish(int r) {
+  void finish(int r) override {
     in->put(CInode::PIN_PTRWAITER);
     if (in->is_auth())
       locker->check_inode_max_size(in, false, new_max_size, newsize, mtime);
@@ -2789,7 +2789,7 @@ class C_Locker_RetryRequestCapRelease : public LockerContext {
 public:
   C_Locker_RetryRequestCapRelease(Locker *l, client_t c, const ceph_mds_request_release& it) :
     LockerContext(l), client(c), item(it) { }
-  void finish(int r) {
+  void finish(int r) override {
     string dname;
     MDRequestRef null_ref;
     locker->process_request_cap_release(null_ref, client, item, dname);
@@ -2889,7 +2889,7 @@ public:
     LockerContext(l), in(i), client(c), seq(s) {
     in->get(CInode::PIN_PTRWAITER);
   }
-  void finish(int r) {
+  void finish(int r) override {
     locker->kick_issue_caps(in, client, seq);
     in->put(CInode::PIN_PTRWAITER);
   }
@@ -3348,7 +3348,7 @@ public:
   C_Locker_RetryCapRelease(Locker *l, client_t c, inodeno_t i, uint64_t id,
                           ceph_seq_t mseq, ceph_seq_t seq) :
     LockerContext(l), client(c), ino(i), cap_id(id), migrate_seq(mseq), issue_seq(seq) {}
-  void finish(int r) {
+  void finish(int r) override {
     locker->_do_cap_release(client, ino, cap_id, migrate_seq, issue_seq);
   }
 };
@@ -4244,7 +4244,7 @@ class C_Locker_ScatterWB : public LockerLogContext {
 public:
   C_Locker_ScatterWB(Locker *l, ScatterLock *sl, MutationRef& m) :
     LockerLogContext(l), lock(sl), mut(m) {}
-  void finish(int r) { 
+  void finish(int r) override 
     locker->scatter_writebehind_finish(lock, mut); 
   }
 };
index f3df8f1d2d2ec36ee82fe2be728890e0bd09ba39..afe4296f179f691557301972550bc6d7db26724d 100644 (file)
@@ -107,7 +107,7 @@ void MDBalancer::tick()
 class C_Bal_SendHeartbeat : public MDSInternalContext {
 public:
   explicit C_Bal_SendHeartbeat(MDSRank *mds_) : MDSInternalContext(mds_) { }
-  virtual void finish(int f) {
+  void finish(int f) override {
     mds->balancer->send_heartbeat();
   }
 };
index fb9b92145474e1639fac0899606b5c4599b50151..e5773dd30e822f2bcd4a67a2a1445cdf745dcb19 100644 (file)
@@ -136,7 +136,7 @@ set<int> SimpleLock::empty_gather_set;
 class MDCacheContext : public virtual MDSInternalContextBase {
 protected:
   MDCache *mdcache;
-  virtual MDSRank *get_mds()
+  MDSRank *get_mds() override
   {
     assert(mdcache != NULL);
     return mdcache->mds;
@@ -156,7 +156,7 @@ public:
 class MDCacheIOContext : public virtual MDSIOContextBase {
 protected:
   MDCache *mdcache;
-  virtual MDSRank *get_mds()
+  MDSRank *get_mds() override
   {
     assert(mdcache != NULL);
     return mdcache->mds;
@@ -168,7 +168,7 @@ public:
 class MDCacheLogContext : public virtual MDSLogContextBase {
 protected:
   MDCache *mdcache;
-  virtual MDSRank *get_mds()
+  MDSRank *get_mds() override
   {
     assert(mdcache != NULL);
     return mdcache->mds;
@@ -486,7 +486,7 @@ struct C_MDC_CreateSystemFile : public MDCacheLogContext {
   MDSInternalContextBase *fin;
   C_MDC_CreateSystemFile(MDCache *c, MutationRef& mu, CDentry *d, version_t v, MDSInternalContextBase *f) :
     MDCacheLogContext(c), mut(mu), dn(d), dpv(v), fin(f) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->_create_system_file_finish(mut, dn, dpv, fin);
   }
 };
@@ -573,7 +573,7 @@ void MDCache::_create_system_file_finish(MutationRef& mut, CDentry *dn, version_
 struct C_MDS_RetryOpenRoot : public MDSInternalContext {
   MDCache *cache;
   explicit C_MDS_RetryOpenRoot(MDCache *c) : MDSInternalContext(c->mds), cache(c) {}
-  void finish(int r) {
+  void finish(int r) override {
     if (r < 0) {
       // If we can't open root, something disastrous has happened: mark
       // this rank damaged for operator intervention.  Note that
@@ -896,7 +896,7 @@ class C_MDC_SubtreeMergeWB : public MDCacheLogContext {
   MutationRef mut;
 public:
   C_MDC_SubtreeMergeWB(MDCache *mdc, CInode *i, MutationRef& m) : MDCacheLogContext(mdc), in(i), mut(m) {}
-  void finish(int r) { 
+  void finish(int r) override 
     mdcache->subtree_merge_writebehind_finish(in, mut);
   }
 };
@@ -2384,7 +2384,7 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
 struct C_MDC_CommittedMaster : public MDCacheLogContext {
   metareqid_t reqid;
   C_MDC_CommittedMaster(MDCache *s, metareqid_t r) : MDCacheLogContext(s), reqid(r) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->_logged_master_commit(reqid);
   }
 };
@@ -2460,7 +2460,7 @@ struct C_MDC_SlaveCommit : public MDCacheLogContext {
   mds_rank_t from;
   metareqid_t reqid;
   C_MDC_SlaveCommit(MDCache *c, int f, metareqid_t r) : MDCacheLogContext(c), from(f), reqid(r) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->_logged_slave_commit(from, reqid);
   }
 };
@@ -4504,7 +4504,7 @@ void MDCache::handle_cache_rejoin_weak(MMDSCacheRejoin *weak)
 class C_MDC_RejoinGatherFinish : public MDCacheContext {
 public:
   explicit C_MDC_RejoinGatherFinish(MDCache *c) : MDCacheContext(c) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->rejoin_gather_finish();
   }
 };
@@ -5206,7 +5206,7 @@ class C_MDC_RejoinOpenInoFinish: public MDCacheContext {
   inodeno_t ino;
 public:
   C_MDC_RejoinOpenInoFinish(MDCache *c, inodeno_t i) : MDCacheContext(c), ino(i) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->rejoin_open_ino_finish(ino, r);
   }
 };
@@ -5248,7 +5248,7 @@ public:
 
   C_MDC_RejoinSessionsOpened(MDCache *c, map<client_t,entity_inst_t>& cm) :
     MDCacheLogContext(c), client_map(cm) {}
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
     mdcache->rejoin_open_sessions_finish(client_map, sseqmap);
   }
@@ -5719,7 +5719,7 @@ void MDCache::do_delayed_cap_imports()
 
 struct C_MDC_OpenSnapParents : public MDCacheContext {
   explicit C_MDC_OpenSnapParents(MDCache *c) : MDCacheContext(c) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->open_snap_parents();
   }
 };
@@ -6059,7 +6059,7 @@ struct C_MDC_QueuedCow : public MDCacheContext {
   MutationRef mut;
   C_MDC_QueuedCow(MDCache *mdc, CInode *i, MutationRef& m) :
     MDCacheContext(mdc), in(i), mut(m) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->_queued_file_recover_cow(in, mut);
   }
 };
@@ -6200,7 +6200,7 @@ class C_MDC_RetryTruncate : public MDCacheContext {
 public:
   C_MDC_RetryTruncate(MDCache *c, CInode *i, LogSegment *l) :
     MDCacheContext(c), in(i), ls(l) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->_truncate_inode(in, ls);
   }
 };
@@ -6233,7 +6233,7 @@ struct C_IO_MDC_TruncateFinish : public MDCacheIOContext {
   LogSegment *ls;
   C_IO_MDC_TruncateFinish(MDCache *c, CInode *i, LogSegment *l) :
     MDCacheIOContext(c), in(i), ls(l) {}
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0 || r == -ENOENT);
     mdcache->truncate_inode_finish(in, ls);
   }
@@ -6276,7 +6276,7 @@ struct C_MDC_TruncateLogged : public MDCacheLogContext {
   MutationRef mut;
   C_MDC_TruncateLogged(MDCache *m, CInode *i, MutationRef& mu) :
     MDCacheLogContext(m), in(i), mut(mu) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->truncate_inode_logged(in, mut);
   }
 };
@@ -7421,7 +7421,7 @@ void MDCache::check_memory_usage()
 class C_MDC_ShutdownCheck : public MDCacheContext {
 public:
   explicit C_MDC_ShutdownCheck(MDCache *m) : MDCacheContext(m) {}
-  void finish(int) {
+  void finish(int) override {
     mdcache->shutdown_check();
   }
 };
@@ -8231,7 +8231,7 @@ struct C_MDC_OpenRemoteDentry : public MDCacheContext {
   bool want_xlocked;
   C_MDC_OpenRemoteDentry(MDCache *m, CDentry *d, inodeno_t i, MDSInternalContextBase *f, bool wx) :
     MDCacheContext(m), dn(d), ino(i), onfinish(f), want_xlocked(wx) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->_open_remote_dentry_finish(dn, ino, onfinish, want_xlocked, r);
   }
 };
@@ -8288,7 +8288,7 @@ class C_IO_MDC_OpenInoBacktraceFetched : public MDCacheIOContext {
   bufferlist bl;
   C_IO_MDC_OpenInoBacktraceFetched(MDCache *c, inodeno_t i) :
     MDCacheIOContext(c), ino(i) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->_open_ino_backtrace_fetched(ino, bl, r);
   }
 };
@@ -8300,7 +8300,7 @@ struct C_MDC_OpenInoTraverseDir : public MDCacheContext {
   public:
   C_MDC_OpenInoTraverseDir(MDCache *c, inodeno_t i, MMDSOpenIno *m,  bool p) :
     MDCacheContext(c), ino(i), msg(m), parent(p) {}
-  void finish(int r) {
+  void finish(int r) override {
     if (r < 0 && !parent)
       r = -EAGAIN;
     if (msg) {
@@ -8316,7 +8316,7 @@ struct C_MDC_OpenInoParentOpened : public MDCacheContext {
   inodeno_t ino;
   public:
   C_MDC_OpenInoParentOpened(MDCache *c, inodeno_t i) : MDCacheContext(c), ino(i) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->_open_ino_parent_opened(ino, r);
   }
 };
@@ -9220,7 +9220,7 @@ struct C_MDC_snaprealm_create_finish : public MDCacheLogContext {
   C_MDC_snaprealm_create_finish(MDCache *c, MDRequestRef& m,
                                 MutationRef& mu, CInode *i) :
     MDCacheLogContext(c), mdr(m), mut(mu), in(i) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->_snaprealm_create_finish(mdr, mut, in);
   }
 };
@@ -9415,7 +9415,7 @@ void MDCache::_snaprealm_create_finish(MDRequestRef& mdr, MutationRef& mut, CIno
 struct C_MDC_RetryScanStray : public MDCacheContext {
   dirfrag_t next;
   C_MDC_RetryScanStray(MDCache *c,  dirfrag_t n) : MDCacheContext(c), next(n) { }
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->scan_stray_dir(next);
   }
 };
@@ -9582,7 +9582,7 @@ struct C_MDC_RetryDiscoverPath : public MDCacheContext {
   mds_rank_t from;
   C_MDC_RetryDiscoverPath(MDCache *c, CInode *b, snapid_t s, filepath &p, mds_rank_t f) :
     MDCacheContext(c), base(b), snapid(s), path(p), from(f)  {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->discover_path(base, snapid, path, 0, from);
   }
 };
@@ -9639,7 +9639,7 @@ struct C_MDC_RetryDiscoverPath2 : public MDCacheContext {
   filepath path;
   C_MDC_RetryDiscoverPath2(MDCache *c, CDir *b, snapid_t s, filepath &p) :
     MDCacheContext(c), base(b), snapid(s), path(p) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdcache->discover_path(base, snapid, path, 0);
   }
 };
@@ -10738,7 +10738,7 @@ class C_MDC_FragmentFrozen : public MDSInternalContext {
 public:
   C_MDC_FragmentFrozen(MDCache *m, MDRequestRef& r) :
     MDSInternalContext(m->mds), mdcache(m), mdr(r) {}
-  virtual void finish(int r) {
+  void finish(int r) override {
     mdcache->fragment_frozen(mdr, r);
   }
 };
@@ -10874,7 +10874,7 @@ class C_MDC_FragmentMarking : public MDCacheContext {
   MDRequestRef mdr;
 public:
   C_MDC_FragmentMarking(MDCache *m, MDRequestRef& r) : MDCacheContext(m), mdr(r) {}
-  virtual void finish(int r) {
+  void finish(int r) override {
     mdcache->fragment_mark_and_complete(mdr);
   }
 };
@@ -11076,7 +11076,7 @@ class C_MDC_FragmentPrep : public MDCacheLogContext {
   MDRequestRef mdr;
 public:
   C_MDC_FragmentPrep(MDCache *m, MDRequestRef& r) : MDCacheLogContext(m),  mdr(r) {}
-  virtual void finish(int r) {
+  void finish(int r) override {
     mdcache->_fragment_logged(mdr);
   }
 };
@@ -11085,7 +11085,7 @@ class C_MDC_FragmentStore : public MDCacheContext {
   MDRequestRef mdr;
 public:
   C_MDC_FragmentStore(MDCache *m, MDRequestRef& r) : MDCacheContext(m), mdr(r) {}
-  virtual void finish(int r) {
+  void finish(int r) override {
     mdcache->_fragment_stored(mdr);
   }
 };
@@ -11096,7 +11096,7 @@ class C_MDC_FragmentCommit : public MDCacheLogContext {
 public:
   C_MDC_FragmentCommit(MDCache *m, dirfrag_t df, list<CDir*>& l) :
     MDCacheLogContext(m), basedirfrag(df), resultfrags(l) {}
-  virtual void finish(int r) {
+  void finish(int r) override {
     mdcache->_fragment_committed(basedirfrag, resultfrags);
   }
 };
@@ -11109,7 +11109,7 @@ public:
     MDCacheIOContext(m), basedirfrag(f) {
     resultfrags.swap(l);
   }
-  virtual void finish(int r) {
+  void finish(int r) override {
     assert(r == 0 || r == -ENOENT);
     mdcache->_fragment_finish(basedirfrag, resultfrags);
   }
@@ -11972,7 +11972,7 @@ public:
     return fin;
   }
 
-  void finish(int r) {
+  void finish(int r) override {
     if (r < 0) { // we failed the lookup or something; dump ourselves
       formatter->open_object_section("results");
       formatter->dump_int("return_code", r);
@@ -12046,7 +12046,7 @@ struct C_MDC_RepairDirfragStats : public MDCacheLogContext {
   MDRequestRef mdr;
   C_MDC_RepairDirfragStats(MDCache *c, MDRequestRef& m) :
     MDCacheLogContext(c), mdr(m) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdr->apply();
     get_mds()->server->respond_to_request(mdr, r);
   }
@@ -12266,10 +12266,10 @@ class C_FinishIOMDR : public MDSInternalContextBase {
 protected:
   MDSRank *mds;
   MDRequestRef mdr;
-  MDSRank *get_mds() { return mds; }
+  MDSRank *get_mds() override { return mds; }
 public:
   C_FinishIOMDR(MDSRank *mds_, MDRequestRef& mdr_) : mds(mds_), mdr(mdr_) {}
-  void finish(int r) { mds->server->respond_to_request(mdr, r); }
+  void finish(int r) override { mds->server->respond_to_request(mdr, r); }
 };
 
 void MDCache::flush_dentry_work(MDRequestRef& mdr)
index e3d5ab724ef5364a17de4046fd10ec2e655441fb..87fe65c03fc58a446d32b2cba68f8433f4737789 100644 (file)
@@ -91,9 +91,9 @@ void MDLog::set_write_iohint(unsigned iohint_flags)
 class C_MDL_WriteError : public MDSIOContextBase {
   protected:
   MDLog *mdlog;
-  MDSRank *get_mds() {return mdlog->mds;}
+  MDSRank *get_mds() override {return mdlog->mds;}
 
-  void finish(int r) {
+  void finish(int r) override {
     MDSRank *mds = get_mds();
     // assume journal is reliable, so don't choose action based on
     // g_conf->mds_action_on_write_error.
@@ -202,7 +202,7 @@ class C_ReopenComplete : public MDSInternalContext {
   MDSInternalContextBase *on_complete;
 public:
   C_ReopenComplete(MDLog *mdlog_, MDSInternalContextBase *on_complete_) : MDSInternalContext(mdlog_->mds), mdlog(mdlog_), on_complete(on_complete_) {}
-  void finish(int r) {
+  void finish(int r) override {
     mdlog->append();
     on_complete->complete(r);
   }
@@ -339,10 +339,10 @@ void MDLog::_submit_entry(LogEvent *le, MDSLogContextBase *c)
 class C_MDL_Flushed : public MDSLogContextBase {
 protected:
   MDLog *mdlog;
-  MDSRank *get_mds() {return mdlog->mds;}
+  MDSRank *get_mds() override {return mdlog->mds;}
   MDSInternalContextBase *wrapped;
 
-  void finish(int r) {
+  void finish(int r) override {
     if (wrapped)
       wrapped->complete(r);
   }
@@ -678,7 +678,7 @@ class C_MaybeExpiredSegment : public MDSInternalContext {
   public:
   C_MaybeExpiredSegment(MDLog *mdl, LogSegment *s, int p) :
     MDSInternalContext(mdl->mds), mdlog(mdl), ls(s), op_prio(p) {}
-  void finish(int res) {
+  void finish(int res) override {
     if (res < 0)
       mdlog->mds->handle_write_error(res);
     mdlog->_maybe_expired(ls, op_prio);
index 58f59f60a6388532499e8786ea4586a61af09039..14b4939fce77d70088c1b14bc4da15913d5ca771 100644 (file)
@@ -85,7 +85,7 @@ class C_VoidFn : public Context
     assert(fn_);
   }
 
-  void finish(int r)
+  void finish(int r) override
   {
     (mds->*fn)();
   }
@@ -96,7 +96,7 @@ class MDSDaemon::C_MDS_Tick : public Context {
     MDSDaemon *mds_daemon;
 public:
   explicit C_MDS_Tick(MDSDaemon *m) : mds_daemon(m) {}
-  void finish(int r) {
+  void finish(int r) override {
     assert(mds_daemon->mds_lock.is_locked_by_me());
 
     mds_daemon->tick_event = 0;
@@ -155,7 +155,7 @@ class MDSSocketHook : public AdminSocketHook {
 public:
   explicit MDSSocketHook(MDSDaemon *m) : mds(m) {}
   bool call(std::string command, cmdmap_t& cmdmap, std::string format,
-           bufferlist& out) {
+           bufferlist& out) override {
     stringstream ss;
     bool r = mds->asok_command(command, cmdmap, format, ss);
     out.append(ss);
@@ -716,7 +716,7 @@ int MDSDaemon::_handle_command(
 
     public:
     explicit SuicideLater(MDSDaemon *mds_) : mds(mds_) {}
-    void finish(int r) {
+    void finish(int r) override {
       // Wait a little to improve chances of caller getting
       // our response before seeing us disappear from mdsmap
       sleep(1);
@@ -733,7 +733,7 @@ int MDSDaemon::_handle_command(
     public:
 
     explicit RespawnLater(MDSDaemon *mds_) : mds(mds_) {}
-    void finish(int r) {
+    void finish(int r) override {
       // Wait a little to improve chances of caller getting
       // our response before seeing us disappear from mdsmap
       sleep(1);
index 36c0947d98b95b29a8ad253ba38d344f9ea76583..0264ae412e04e6462a8359816f36ad9ae117cabb 100644 (file)
@@ -284,7 +284,7 @@ class C_MDS_VoidFn : public MDSInternalContext
     assert(fn_);
   }
 
-  void finish(int r)
+  void finish(int r) override
   {
     (mds->*fn)();
   }
@@ -907,7 +907,7 @@ class C_MDS_BootStart : public MDSInternalContext {
 public:
   C_MDS_BootStart(MDSRank *m, MDSRank::BootStep n)
     : MDSInternalContext(m), nextstep(n) {}
-  void finish(int r) {
+  void finish(int r) override {
     mds->boot_start(nextstep, r);
   }
 };
@@ -1055,7 +1055,7 @@ class MDSRank::C_MDS_StandbyReplayRestartFinish : public MDSIOContext {
 public:
   C_MDS_StandbyReplayRestartFinish(MDSRank *mds_, uint64_t old_read_pos_) :
     MDSIOContext(mds_), old_read_pos(old_read_pos_) {}
-  void finish(int r) {
+  void finish(int r) override {
     mds->_standby_replay_restart_finish(r, old_read_pos);
   }
 };
@@ -1104,7 +1104,7 @@ inline void MDSRank::standby_replay_restart()
 class MDSRank::C_MDS_StandbyReplayRestart : public MDSInternalContext {
 public:
   explicit C_MDS_StandbyReplayRestart(MDSRank *m) : MDSInternalContext(m) {}
-  void finish(int r) {
+  void finish(int r) override {
     assert(!r);
     mds->standby_replay_restart();
   }
@@ -1788,7 +1788,7 @@ public:
     MDSDaemon::send_command_reply(m, mds, r, bl, out_str);
     m->put();
   }
-  void finish (int r) {
+  void finish (int r) override {
     send(r, "");
   }
 };
index 4dff77aac01b8ffa99dd07848b4a20ae1e84b7c4..937ae41abc29f824da4fc4de691411663754e2fc 100644 (file)
@@ -38,7 +38,7 @@ class MDSTableIOContext : public MDSIOContextBase
 {
   protected:
     MDSTable *ida;
-    MDSRank *get_mds() {return ida->mds;}
+    MDSRank *get_mds() override {return ida->mds;}
   public:
     explicit MDSTableIOContext(MDSTable *ida_) : ida(ida_) {
       assert(ida != NULL);
@@ -50,7 +50,7 @@ class C_IO_MT_Save : public MDSTableIOContext {
   version_t version;
 public:
   C_IO_MT_Save(MDSTable *i, version_t v) : MDSTableIOContext(i), version(v) {}
-  void finish(int r) {
+  void finish(int r) override {
     ida->save_2(r, version);
   }
 };
@@ -125,7 +125,7 @@ public:
   Context *onfinish;
   bufferlist bl;
   C_IO_MT_Load(MDSTable *i, Context *o) : MDSTableIOContext(i), onfinish(o) {}
-  void finish(int r) {
+  void finish(int r) override {
     ida->load_2(r, bl, onfinish);
   }
 };
index 8d66116c23b1743daac09866693848b654879364..7d0353e61d2e69d1b9898533e708fb7dda30bf5a 100644 (file)
 class C_LoggedAck : public MDSLogContextBase {
   MDSTableClient *tc;
   version_t tid;
-  MDSRank *get_mds() { return tc->mds; }
+  MDSRank *get_mds() override { return tc->mds; }
 public:
   C_LoggedAck(MDSTableClient *a, version_t t) : tc(a), tid(t) {}
-  void finish(int r) {
+  void finish(int r) override {
     tc->_logged_ack(tid);
   }
 };
index 83987e8e07caef66690115a6de55ec4e37dffa57..4552a469637ac8d0a8b412b16fa82fec6051fc43 100644 (file)
@@ -42,11 +42,11 @@ class C_Prepare : public MDSLogContextBase {
   MDSTableServer *server;
   MMDSTableRequest *req;
   version_t tid;
-  MDSRank *get_mds() { return server->mds; }
+  MDSRank *get_mds() override { return server->mds; }
 public:
 
   C_Prepare(MDSTableServer *s, MMDSTableRequest *r, version_t v) : server(s), req(r), tid(v) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_prepare_logged(req, tid);
   }
 };
@@ -86,10 +86,10 @@ void MDSTableServer::_prepare_logged(MMDSTableRequest *req, version_t tid)
 class C_Commit : public MDSLogContextBase {
   MDSTableServer *server;
   MMDSTableRequest *req;
-  MDSRank *get_mds() { return server->mds; }
+  MDSRank *get_mds() override { return server->mds; }
 public:
   C_Commit(MDSTableServer *s, MMDSTableRequest *r) : server(s), req(r) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_commit_logged(req);
   }
 };
index 2459af1bba36c780d6147a629207820ddcd6fd3d..95e1c89c02218009f79a49f85b47cc5df2e7ed65 100644 (file)
@@ -87,7 +87,7 @@
 class MigratorContext : public MDSInternalContextBase {
 protected:
   Migrator *mig;
-  MDSRank *get_mds() {
+  MDSRank *get_mds() override {
     return mig->mds;
   }
 public:
@@ -99,7 +99,7 @@ public:
 class MigratorLogContext : public MDSLogContextBase {
 protected:
   Migrator *mig;
-  MDSRank *get_mds() {
+  MDSRank *get_mds() override {
     return mig->mds;
   }
 public:
@@ -167,7 +167,7 @@ class C_MDC_EmptyImport : public MigratorContext {
   CDir *dir;
 public:
   C_MDC_EmptyImport(Migrator *m, CDir *d) : MigratorContext(m), dir(d) {}
-  void finish(int r) {
+  void finish(int r) override {
     mig->export_empty_import(dir);
   }
 };
@@ -692,7 +692,7 @@ public:
        MigratorContext(m), ex(e), tid(t) {
           assert(ex != NULL);
         }
-  virtual void finish(int r) {
+  void finish(int r) override {
     if (r >= 0)
       mig->export_frozen(ex, tid);
   }
@@ -892,7 +892,7 @@ public:
    : MigratorContext(m), dir(d), tid(t) {
     assert(dir != NULL);
   }
-  void finish(int r) {
+  void finish(int r) override {
     mig->export_sessions_flushed(dir, tid);
   }
 };
@@ -1190,7 +1190,7 @@ public:
     MigratorContext(m), dir(d), tid(t) {
       assert(dir != NULL);
     }
-  void finish(int r) {
+  void finish(int r) override {
     mig->export_go_synced(dir, tid);
   }
 };
@@ -1544,7 +1544,7 @@ class C_MDS_ExportFinishLogged : public MigratorLogContext {
   CDir *dir;
 public:
   C_MDS_ExportFinishLogged(Migrator *m, CDir *d) : MigratorLogContext(m), dir(d) {}
-  void finish(int r) {
+  void finish(int r) override {
     mig->export_logged_finish(dir);
   }
 };
@@ -2229,7 +2229,7 @@ public:
   C_MDS_ImportDirLoggedStart(Migrator *m, CDir *d, mds_rank_t f) :
     MigratorLogContext(m), df(d->dirfrag()), dir(d), from(f) {
   }
-  void finish(int r) {
+  void finish(int r) override {
     mig->import_logged_start(df, dir, from, imported_client_map, sseqmap);
   }
 };
@@ -3084,7 +3084,7 @@ public:
   map<client_t,uint64_t> sseqmap;
 
   C_M_LoggedImportCaps(Migrator *m, CInode *i, mds_rank_t f) : MigratorLogContext(m), in(i), from(f) {}
-  void finish(int r) {
+  void finish(int r) override {
     mig->logged_import_caps(in, from, peer_exports, client_map, sseqmap);
   }  
 };
index 9f1f236fa9614bf68ee94677548c9588baf9745c..b0dec74b3a644ae2b64826fd4027dbae5ead80b1 100644 (file)
@@ -30,11 +30,11 @@ class C_MDC_Recover : public MDSIOContextBase {
 protected:
   RecoveryQueue *rq;
   CInode *in;
-  void finish(int r) {
+  void finish(int r) override {
     rq->_recovered(in, r, size, mtime);
   }
 
-  MDSRank *get_mds() {
+  MDSRank *get_mds() override {
     return rq->mds;
   }
 
index ab23531c92e12456beb8665658e2fa4126a246fc..f351597290911761efd64936655f48a3b89c9af3 100644 (file)
@@ -256,7 +256,7 @@ class C_InodeValidated : public MDSInternalContext
       : MDSInternalContext(mds), stack(stack_), target(target_)
     {}
 
-    void finish(int r)
+    void finish(int r) override
     {
       stack->_validate_inode_done(target, r, result);
     }
index 539b7a8108340bf14ffd4edc9152cfc66eca5521..ea79583496066421fc8e665fed40c6f2598c8f0d 100644 (file)
@@ -75,7 +75,7 @@ using namespace std;
 class ServerContext : public MDSInternalContextBase {
   protected:
   Server *server;
-  MDSRank *get_mds()
+  MDSRank *get_mds() override
   {
     return server->mds;
   }
@@ -89,13 +89,13 @@ class ServerContext : public MDSInternalContextBase {
 class ServerLogContext : public MDSLogContextBase {
 protected:
   Server *server;
-  MDSRank *get_mds()
+  MDSRank *get_mds() override
   {
     return server->mds;
   }
 
   MDRequestRef mdr;
-  void pre_finish(int r) {
+  void pre_finish(int r) override {
     if (mdr)
       mdr->mark_event("journal_committed: ");
   }
@@ -240,7 +240,7 @@ public:
     ServerLogContext(srv), session(se), state_seq(sseq), open(s), cmapv(mv), inotablev(0), fin(fin_) { }
   C_MDS_session_finish(Server *srv, Session *se, uint64_t sseq, bool s, version_t mv, interval_set<inodeno_t>& i, version_t iv, Context *fin_ = NULL) :
     ServerLogContext(srv), session(se), state_seq(sseq), open(s), cmapv(mv), inos(i), inotablev(iv), fin(fin_) { }
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
     server->_session_logged(session, state_seq, open, cmapv, inos, inotablev);
     if (fin) {
@@ -585,7 +585,7 @@ void Server::finish_force_open_sessions(map<client_t,entity_inst_t>& cm,
 }
 
 class C_MDS_TerminatedSessions : public ServerContext {
-  void finish(int r) {
+  void finish(int r) override {
     server->terminating_sessions = false;
   }
   public:
@@ -2451,7 +2451,7 @@ class C_MDS_TryFindInode : public ServerContext {
   MDRequestRef mdr;
 public:
   C_MDS_TryFindInode(Server *s, MDRequestRef& r) : ServerContext(s), mdr(r) {}
-  virtual void finish(int r) {
+  void finish(int r) override {
     if (r == -ESTALE) // :( find_ino_peers failed
       server->respond_to_request(mdr, r);
     else
@@ -2798,7 +2798,7 @@ void Server::handle_client_getattr(MDRequestRef& mdr, bool is_lookup)
 struct C_MDS_LookupIno2 : public ServerContext {
   MDRequestRef mdr;
   C_MDS_LookupIno2(Server *s, MDRequestRef& r) : ServerContext(s), mdr(r) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_lookup_ino_2(mdr, r);
   }
 };
@@ -3115,7 +3115,7 @@ class C_MDS_openc_finish : public ServerLogContext {
 public:
   C_MDS_openc_finish(Server *s, MDRequestRef& r, CDentry *d, CInode *ni, snapid_t f) :
     ServerLogContext(s, r), dn(d), newi(ni), follows(f) {}
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
 
     dn->pop_projected_linkage();
@@ -3576,7 +3576,7 @@ public:
   C_MDS_inode_update_finish(Server *s, MDRequestRef& r, CInode *i,
                            bool sm=false, bool cr=false) :
     ServerLogContext(s, r), in(i), truncating_smaller(sm), changed_ranges(cr) { }
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
 
     // apply
@@ -4485,7 +4485,7 @@ public:
 
   C_MDS_inode_xattr_update_finish(Server *s, MDRequestRef& r, CInode *i) :
     ServerLogContext(s, r), in(i) { }
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
 
     // apply
@@ -4646,7 +4646,7 @@ class C_MDS_mknod_finish : public ServerLogContext {
 public:
   C_MDS_mknod_finish(Server *s, MDRequestRef& r, CDentry *d, CInode *ni) :
     ServerLogContext(s, r), dn(d), newi(ni) {}
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
 
     // link the inode
@@ -4988,7 +4988,7 @@ public:
                          version_t dnpv_, version_t tipv_) :
     ServerLogContext(s, r), dn(d), targeti(ti),
     dnpv(dnpv_), tipv(tipv_) { }
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
     server->_link_local_finish(mdr, dn, targeti, dnpv, tipv);
   }
@@ -5064,7 +5064,7 @@ public:
   C_MDS_link_remote_finish(Server *s, MDRequestRef& r, bool i, CDentry *d, CInode *ti) :
     ServerLogContext(s, r), inc(i), dn(d), targeti(ti),
     dpv(d->get_projected_version()) {}
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
     server->_link_remote_finish(mdr, inc, dn, targeti, dpv);
   }
@@ -5185,7 +5185,7 @@ class C_MDS_SlaveLinkPrep : public ServerLogContext {
 public:
   C_MDS_SlaveLinkPrep(Server *s, MDRequestRef& r, CInode *t) :
     ServerLogContext(s, r), targeti(t) { }
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
     server->_logged_slave_link(mdr, targeti);
   }
@@ -5197,7 +5197,7 @@ class C_MDS_SlaveLinkCommit : public ServerContext {
 public:
   C_MDS_SlaveLinkCommit(Server *s, MDRequestRef& r, CInode *t) :
     ServerContext(s), mdr(r), targeti(t) { }
-  void finish(int r) {
+  void finish(int r) override {
     server->_commit_slave_link(mdr, r, targeti);
   }
 };
@@ -5304,7 +5304,7 @@ void Server::_logged_slave_link(MDRequestRef& mdr, CInode *targeti)
 
 struct C_MDS_CommittedSlave : public ServerLogContext {
   C_MDS_CommittedSlave(Server *s, MDRequestRef& m) : ServerLogContext(s, m) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_committed_slave(mdr);
   }
 };
@@ -5346,7 +5346,7 @@ void Server::_committed_slave(MDRequestRef& mdr)
 struct C_MDS_LoggedLinkRollback : public ServerLogContext {
   MutationRef mut;
   C_MDS_LoggedLinkRollback(Server *s, MutationRef& m, MDRequestRef& r) : ServerLogContext(s, r), mut(m) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_link_rollback_finish(mut, mdr);
   }
 };
@@ -5617,7 +5617,7 @@ public:
   C_MDS_unlink_local_finish(Server *s, MDRequestRef& r, CDentry *d, CDentry *sd) :
     ServerLogContext(s, r), dn(d), straydn(sd),
     dnpv(d->get_projected_version()) {}
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
     server->_unlink_local_finish(mdr, dn, straydn, dnpv);
   }
@@ -5787,7 +5787,7 @@ struct C_MDS_SlaveRmdirPrep : public ServerLogContext {
   CDentry *dn, *straydn;
   C_MDS_SlaveRmdirPrep(Server *s, MDRequestRef& r, CDentry *d, CDentry *st)
     : ServerLogContext(s, r), dn(d), straydn(st) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_logged_slave_rmdir(mdr, dn, straydn);
   }
 };
@@ -5796,7 +5796,7 @@ struct C_MDS_SlaveRmdirCommit : public ServerContext {
   MDRequestRef mdr;
   C_MDS_SlaveRmdirCommit(Server *s, MDRequestRef& r)
     : ServerContext(s), mdr(r) { }
-  void finish(int r) {
+  void finish(int r) override {
     server->_commit_slave_rmdir(mdr, r);
   }
 };
@@ -5971,7 +5971,7 @@ struct C_MDS_LoggedRmdirRollback : public ServerLogContext {
   CDentry *straydn;
   C_MDS_LoggedRmdirRollback(Server *s, MDRequestRef& m, metareqid_t mr, CDentry *d, CDentry *st)
     : ServerLogContext(s, m), reqid(mr), dn(d), straydn(st) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_rmdir_rollback_finish(mdr, reqid, dn, straydn);
   }
 };
@@ -6137,7 +6137,7 @@ public:
                      CDentry *sdn, CDentry *ddn, CDentry *stdn) :
     ServerLogContext(s, r),
     srcdn(sdn), destdn(ddn), straydn(stdn) { }
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
     server->_rename_finish(mdr, srcdn, destdn, straydn);
   }
@@ -7150,7 +7150,7 @@ class C_MDS_SlaveRenamePrep : public ServerLogContext {
 public:
   C_MDS_SlaveRenamePrep(Server *s, MDRequestRef& m, CDentry *sr, CDentry *de, CDentry *st) :
     ServerLogContext(s, m), srcdn(sr), destdn(de), straydn(st) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_logged_slave_rename(mdr, srcdn, destdn, straydn);
   }
 };
@@ -7161,7 +7161,7 @@ class C_MDS_SlaveRenameCommit : public ServerContext {
 public:
   C_MDS_SlaveRenameCommit(Server *s, MDRequestRef& m, CDentry *sr, CDentry *de, CDentry *st) :
     ServerContext(s), mdr(m), srcdn(sr), destdn(de), straydn(st) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_commit_slave_rename(mdr, r, srcdn, destdn, straydn);
   }
 };
@@ -7171,7 +7171,7 @@ class C_MDS_SlaveRenameSessionsFlushed : public ServerContext {
 public:
   C_MDS_SlaveRenameSessionsFlushed(Server *s, MDRequestRef& r) :
     ServerContext(s), mdr(r) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_slave_rename_sessions_flushed(mdr);
   }
 };
@@ -7600,7 +7600,7 @@ struct C_MDS_LoggedRenameRollback : public ServerLogContext {
                             CDentry *st, bool f) :
     ServerLogContext(s, r), mut(m), srcdn(sd), srcdnpv(pv), destdn(dd),
     straydn(st), finish_mdr(f) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_rename_rollback_finish(mut, mdr, srcdn, srcdnpv,
                                    destdn, straydn, finish_mdr);
   }
@@ -8090,7 +8090,7 @@ struct C_MDS_mksnap_finish : public ServerLogContext {
   SnapInfo info;
   C_MDS_mksnap_finish(Server *s, MDRequestRef& r, CInode *di, SnapInfo &i) :
     ServerLogContext(s, r), diri(di), info(i) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_mksnap_finish(mdr, diri, info);
   }
 };
@@ -8242,7 +8242,7 @@ struct C_MDS_rmsnap_finish : public ServerLogContext {
   snapid_t snapid;
   C_MDS_rmsnap_finish(Server *s, MDRequestRef& r, CInode *di, snapid_t sn) :
     ServerLogContext(s, r), diri(di), snapid(sn) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_rmsnap_finish(mdr, diri, snapid);
   }
 };
@@ -8368,7 +8368,7 @@ struct C_MDS_renamesnap_finish : public ServerLogContext {
   snapid_t snapid;
   C_MDS_renamesnap_finish(Server *s, MDRequestRef& r, CInode *di, snapid_t sn) :
     ServerLogContext(s, r), diri(di), snapid(sn) {}
-  void finish(int r) {
+  void finish(int r) override {
     server->_renamesnap_finish(mdr, diri, snapid);
   }
 };
index f70337fd67e06bde28fa7aa30bc21e6f539ee4b9..a32437de2c1f6ea4aa52ba9da0275f350bb9e709 100644 (file)
@@ -34,7 +34,7 @@ class SessionMapIOContext : public MDSIOContextBase
 {
   protected:
     SessionMap *sessionmap;
-    MDSRank *get_mds() {return sessionmap->mds;}
+    MDSRank *get_mds() override {return sessionmap->mds;}
   public:
     explicit SessionMapIOContext(SessionMap *sessionmap_) : sessionmap(sessionmap_) {
       assert(sessionmap != NULL);
@@ -94,7 +94,7 @@ public:
   C_IO_SM_Load(SessionMap *cm, const bool f)
     : SessionMapIOContext(cm), first(f), header_r(0), values_r(0) {}
 
-  void finish(int r) {
+  void finish(int r) override {
     sessionmap->_load_finish(r, header_r, values_r, first, header_bl, session_vals);
   }
 };
@@ -275,7 +275,7 @@ class C_IO_SM_LoadLegacy : public SessionMapIOContext {
 public:
   bufferlist bl;
   explicit C_IO_SM_LoadLegacy(SessionMap *cm) : SessionMapIOContext(cm) {}
-  void finish(int r) {
+  void finish(int r) override {
     sessionmap->_load_legacy_finish(r, bl);
   }
 };
@@ -338,7 +338,7 @@ class C_IO_SM_Save : public SessionMapIOContext {
   version_t version;
 public:
   C_IO_SM_Save(SessionMap *cm, version_t v) : SessionMapIOContext(cm), version(v) {}
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0);
     sessionmap->_save_finish(version);
   }
@@ -675,7 +675,7 @@ class C_IO_SM_Save_One : public SessionMapIOContext {
 public:
   C_IO_SM_Save_One(SessionMap *cm, MDSInternalContextBase *on_safe_)
     : SessionMapIOContext(cm), on_safe(on_safe_) {}
-  void finish(int r) {
+  void finish(int r) override {
     if (r != 0) {
       get_mds()->handle_write_error(r);
     } else {
index 3f9b93d3a2b35d7ff8bde65873320fb98445d42e..0b22b14b694c90ab39c7666dec37e5eb20761622 100644 (file)
@@ -100,8 +100,8 @@ struct C_SR_RetryOpenParents : public MDSInternalContextBase {
     sr(s), first(f), last(l), parent_last(pl),  parent(p), fin(c) {
     sr->inode->get(CInode::PIN_OPENINGSNAPPARENTS);
   }
-  MDSRank *get_mds() { return sr->mdcache->mds; }
-  void finish(int r) {
+  MDSRank *get_mds() override { return sr->mdcache->mds; }
+  void finish(int r) override {
     if (r < 0)
       sr->_remove_missing_parent(parent_last, parent, r);
     if (sr->_open_parents(fin, first, last))
index f62c73dab49176f80d176551dd9588d3d2ad2c2e..e914790cc05d3264d59e73045b0cf1c3077c81be 100644 (file)
@@ -38,7 +38,7 @@ static ostream& _prefix(std::ostream *_dout, MDSRank *mds) {
 class StrayManagerIOContext : public virtual MDSIOContextBase {
 protected:
   StrayManager *sm;
-  virtual MDSRank *get_mds()
+  MDSRank *get_mds() override
   {
     return sm->mds;
   }
@@ -49,7 +49,7 @@ public:
 class StrayManagerLogContext : public virtual MDSLogContextBase {
 protected:
   StrayManager *sm;
-  virtual MDSRank *get_mds()
+  MDSRank *get_mds() override
   {
     return sm->mds;
   }
@@ -60,7 +60,7 @@ public:
 class StrayManagerContext : public virtual MDSInternalContextBase {
 protected:
   StrayManager *sm;
-  virtual MDSRank *get_mds()
+  MDSRank *get_mds() override
   {
     return sm->mds;
   }
@@ -80,7 +80,7 @@ class C_IO_PurgeStrayPurged : public StrayManagerIOContext {
 public:
   C_IO_PurgeStrayPurged(StrayManager *sm_, CDentry *d, bool oh, uint32_t ops) : 
     StrayManagerIOContext(sm_), dn(d), only_head(oh), ops_allowance(ops) { }
-  void finish(int r) {
+  void finish(int r) override {
     assert(r == 0 || r == -ENOENT);
     sm->_purge_stray_purged(dn, ops_allowance, only_head);
   }
@@ -188,7 +188,7 @@ class C_PurgeStrayLogged : public StrayManagerLogContext {
 public:
   C_PurgeStrayLogged(StrayManager *sm_, CDentry *d, version_t v, LogSegment *s) : 
     StrayManagerLogContext(sm_), dn(d), pdv(v), ls(s) { }
-  void finish(int r) {
+  void finish(int r) override {
     sm->_purge_stray_logged(dn, pdv, ls);
   }
 };
@@ -199,7 +199,7 @@ class C_TruncateStrayLogged : public StrayManagerLogContext {
 public:
   C_TruncateStrayLogged(StrayManager *sm, CDentry *d, LogSegment *s) :
     StrayManagerLogContext(sm), dn(d), ls(s) { }
-  void finish(int r) {
+  void finish(int r) override {
     sm->_truncate_stray_logged(dn, ls);
   }
 };
@@ -365,7 +365,7 @@ class C_StraysFetched : public StrayManagerContext {
 public:
   C_StraysFetched(StrayManager *sm_) :
     StrayManagerContext(sm_) { }
-  void finish(int r) {
+  void finish(int r) override {
     sm->_advance();
   }
 };
@@ -486,7 +486,7 @@ class C_OpenSnapParents : public StrayManagerContext {
   public:
     C_OpenSnapParents(StrayManager *sm_, CDentry *dn_, bool t, uint32_t ops) :
       StrayManagerContext(sm_), dn(dn_), trunc(t), ops_required(ops) { }
-    void finish(int r) {
+    void finish(int r) override {
       sm->_process(dn, trunc, ops_required);
     }
 };
@@ -586,7 +586,7 @@ void StrayManager::notify_stray_removed()
 struct C_EvalStray : public StrayManagerContext {
   CDentry *dn;
   C_EvalStray(StrayManager *sm_, CDentry *d) : StrayManagerContext(sm_), dn(d) {}
-  void finish(int r) {
+  void finish(int r) override {
     sm->eval_stray(dn);
   }
 };
@@ -594,7 +594,7 @@ struct C_EvalStray : public StrayManagerContext {
 struct C_MDC_EvalStray : public StrayManagerContext {
   CDentry *dn;
   C_MDC_EvalStray(StrayManager *sm_, CDentry *d) : StrayManagerContext(sm_), dn(d) {}
-  void finish(int r) {
+  void finish(int r) override {
     sm->eval_stray(dn);
   }
 };