diff options
author | Greg Farnum <gregory.farnum@dreamhost.com> | 2012-02-23 15:40:20 -0800 |
---|---|---|
committer | Greg Farnum <gregory.farnum@dreamhost.com> | 2012-02-23 18:13:43 -0800 |
commit | 3bad945bd3ae718a58fe50d8ceee773b57467286 (patch) | |
tree | 1894e6d365ca7207159eecedcb83f42456d3bd9b /src/mds | |
parent | c88da93ecd6a8289860787d10eefb0e132f9d299 (diff) | |
download | ceph-3bad945bd3ae718a58fe50d8ceee773b57467286.tar.gz |
mds: remove unused MDBalancer dump_pop_map() function.
Commenting it out is not the right answer. ;)
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Reviewed-by: Dan Mick <dan.mick@dreamhost.com>
Diffstat (limited to 'src/mds')
-rw-r--r-- | src/mds/MDBalancer.cc | 97 | ||||
-rw-r--r-- | src/mds/MDBalancer.h | 1 |
2 files changed, 0 insertions, 98 deletions
diff --git a/src/mds/MDBalancer.cc b/src/mds/MDBalancer.cc index 598558e25da..d03c0fe192b 100644 --- a/src/mds/MDBalancer.cc +++ b/src/mds/MDBalancer.cc @@ -437,8 +437,6 @@ void MDBalancer::prep_rebalance(int beat) int whoami = mds->get_nodeid(); rebalance_time = ceph_clock_now(g_ceph_context); - dump_pop_map(); - // reset my_targets.clear(); imported.clear(); @@ -1149,98 +1147,3 @@ void MDBalancer::show_imports(bool external) { mds->mdcache->show_subtrees(); } - - -void MDBalancer::dump_pop_map() -{ - return; // this is dumb - -/* - - char fn[32]; - snprintf(fn, sizeof(fn), "popdump.%d.mds%d", beat_epoch, mds->get_nodeid()); - - dout(1) << "dump_pop_map to " << fn << dendl; - - ofstream myfile; - myfile.open(fn); - - list<CInode*> iq; - if (mds->mdcache->root) - iq.push_back(mds->mdcache->root); - - utime_t now = ceph_clock_now(g_ceph_context); - while (!iq.empty()) { - CInode *in = iq.front(); - iq.pop_front(); - - // pop stats - //for (int a=0; a<MDS_NPOP; a++) - // for (int b=0; b<META_NPOP; b++) - // myfile << in->popularity[a].pop[b].get(now) << "\t"; - - // recurse, depth-first. - if (in->is_dir()) { - - list<CDir*> dirs; - in->get_dirfrags(dirs); - for (list<CDir*>::iterator p = dirs.begin(); - p != dirs.end(); - ++p) { - CDir *dir = *p; - - myfile << (int)dir->pop_me.meta_load(now, mds->mdcache->decayrate) << "\t"; - myfile << (int)dir->pop_nested.meta_load(now, mds->mdcache->decayrate) << "\t"; - myfile << (int)dir->pop_auth_subtree.meta_load(now, mds->mdcache->decayrate) << "\t"; - myfile << (int)dir->pop_auth_subtree_nested.meta_load(now, mds->mdcache->decayrate) << "\t"; - - // filename last - string p; - in->make_path_string(p); - myfile << "." << p; - if (dir->get_frag() != frag_t()) - myfile << "___" << (unsigned)dir->get_frag(); - myfile << std::endl; //"/" << dir->get_frag() << dendl; - - // add contents - for (CDir::map_t::iterator q = dir->items.begin(); - q != dir->items.end(); - q++) - if (q->second->get_linkage()->is_primary()) - iq.push_front(q->second->get_linkage()->get_inode()); - } - } - - } - - myfile.close(); -*/ -} - - - -/* replicate? - - float dir_pop = dir->get_popularity(); - - if (dir->is_auth()) { - if (!dir->is_rep() && - dir_pop >= g_conf->mds_bal_replicate_threshold) { - // replicate - dout(5) << "replicating dir " << *in << " pop " << dir_pop << dendl; - - dir->dir_rep = CDIR_REP_ALL; - mds->mdcache->send_dir_updates(dir); - } - - if (dir->is_rep() && - dir_pop < g_conf->mds_bal_unreplicate_threshold) { - // unreplicate - dout(5) << "unreplicating dir " << *in << " pop " << dir_pop << dendl; - - dir->dir_rep = CDIR_REP_NONE; - mds->mdcache->send_dir_updates(dir); - } - } - -*/ diff --git a/src/mds/MDBalancer.h b/src/mds/MDBalancer.h index 2b983787a07..0aa931fdfe4 100644 --- a/src/mds/MDBalancer.h +++ b/src/mds/MDBalancer.h @@ -114,7 +114,6 @@ public: void show_imports(bool external=false); - void dump_pop_map(); void queue_split(CDir *dir); void queue_merge(CDir *dir); |