]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove unused 'Context *' parameter from MDCache::repair_foo_stats()
authorYan, Zheng <zyan@redhat.com>
Thu, 28 Jan 2016 13:32:05 +0000 (21:32 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 7 Mar 2016 07:59:13 +0000 (15:59 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/CDir.cc
src/mds/CInode.cc
src/mds/MDCache.cc
src/mds/MDCache.h

index f216da465d3938b4e178dc663f2e4e1084f03e9d..0dae5bc19918b7efcce3e15ca64d4b0a06b3abdf 100644 (file)
@@ -3096,7 +3096,7 @@ bool CDir::scrub_local()
     scrub_infop->pending_scrub_error = true;
     if (scrub_infop->header &&
        scrub_infop->header->repair)
-      cache->repair_dirfrag_stats(this, NULL);
+      cache->repair_dirfrag_stats(this);
   }
   return rval;
 }
index 08135a093d2cc35d20eea37143c0c13970dc0a5f..dcafcf72b680993f06f1d0e52847dad5f9924a39 100644 (file)
@@ -3953,7 +3953,7 @@ next:
        if (in->scrub_infop &&
            in->scrub_infop->header &&
            in->scrub_infop->header->repair)
-         in->mdcache->repair_inode_stats(in, NULL);
+         in->mdcache->repair_inode_stats(in);
        goto next;
       }
       if (frags_errors > 0)
index 3bcd4be24015b017305d519cb33a576d8172e2ef..cbd76342772d94f1d2dd6d79c803faeedf9075d5 100644 (file)
@@ -11775,14 +11775,12 @@ struct C_MDC_RepairDirfragStats : public MDSInternalContext {
   }
 };
 
-void MDCache::repair_dirfrag_stats(CDir *dir, Context *fin)
+void MDCache::repair_dirfrag_stats(CDir *dir)
 {
-  if (!fin)
-    fin = new C_MDSInternalNoop;
   MDRequestRef mdr = request_start_internal(CEPH_MDS_OP_REPAIR_FRAGSTATS);
   mdr->pin(dir);
   mdr->internal_op_private = dir;
-  mdr->internal_op_finish = fin;
+  mdr->internal_op_finish = new C_MDSInternalNoop;
   repair_dirfrag_stats_work(mdr);
 }
 
@@ -11877,14 +11875,12 @@ void MDCache::repair_dirfrag_stats_work(MDRequestRef& mdr)
   mds->mdlog->submit_entry(le, new C_MDC_RepairDirfragStats(mds, mdr));
 }
 
-void MDCache::repair_inode_stats(CInode *diri, Context *fin)
+void MDCache::repair_inode_stats(CInode *diri)
 {
-  if (!fin)
-    fin = new C_MDSInternalNoop;
   MDRequestRef mdr = request_start_internal(CEPH_MDS_OP_REPAIR_INODESTATS);
   mdr->pin(diri);
   mdr->internal_op_private = diri;
-  mdr->internal_op_finish = fin;
+  mdr->internal_op_finish = new C_MDSInternalNoop;
   repair_inode_stats_work(mdr);
 }
 
index 0994b77f92d93063f7f475e52dd04d7275c71e8a..5aadc13981ee34b7d538735c95b68f9f1b6ab27f 100644 (file)
@@ -1151,8 +1151,8 @@ public:
   void enqueue_scrub(const string& path, const std::string &tag,
                      bool force, bool recursive, bool repair,
                     Formatter *f, Context *fin);
-  void repair_inode_stats(CInode *diri, Context *fin);
-  void repair_dirfrag_stats(CDir *dir, Context *fin);
+  void repair_inode_stats(CInode *diri);
+  void repair_dirfrag_stats(CDir *dir);
 };
 
 class C_MDS_RetryRequest : public MDSInternalContext {