From f77c889e83bc301f903cea915f284e4b7689abf0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 5 Feb 2011 20:43:58 -0800 Subject: [PATCH] remove ancient mds_local_osd option This used to add a few osds to the end of the osdmap, not included in the crush map, with the assumption that they would be colocated with the MDSs and used as the primary MDS journal copy. Not a useful hack anymore; you can do this all explicitly by setting up your own crush map. Signed-off-by: Sage Weil --- src/config.cc | 1 - src/config.h | 2 -- src/mds/MDLog.cc | 3 --- src/osd/OSDMap.cc | 13 +------------ src/osd/OSDMap.h | 3 +-- src/osdmaptool.cc | 2 +- 6 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/config.cc b/src/config.cc index 3a7bdcd1bad1b..72a8820c98b0f 100644 --- a/src/config.cc +++ b/src/config.cc @@ -410,7 +410,6 @@ static struct config_option config_optionsp[] = { OPTION(mds_bal_target_removal_max, 0, OPT_INT, 10), // max balance iterations before old target is removed OPTION(mds_replay_interval, 0, OPT_FLOAT, 1.0), // time to wait before starting replay again OPTION(mds_shutdown_check, 0, OPT_INT, 0), - OPTION(mds_local_osd, 0, OPT_BOOL, false), OPTION(mds_thrash_exports, 0, OPT_INT, 0), OPTION(mds_thrash_fragments, 0, OPT_INT, 0), OPTION(mds_dump_cache_on_map, 0, OPT_BOOL, false), diff --git a/src/config.h b/src/config.h index cff8a927749ea..7b2b865336b32 100644 --- a/src/config.h +++ b/src/config.h @@ -303,8 +303,6 @@ struct md_config_t { int mds_shutdown_check; - bool mds_local_osd; - int mds_thrash_exports; int mds_thrash_fragments; bool mds_dump_cache_on_map; diff --git a/src/mds/MDLog.cc b/src/mds/MDLog.cc index 999cda0f495fe..3a99f4f931421 100644 --- a/src/mds/MDLog.cc +++ b/src/mds/MDLog.cc @@ -86,9 +86,6 @@ void MDLog::init_journaler() // inode ino = MDS_INO_LOG_OFFSET + mds->get_nodeid(); - //if (g_conf.mds_local_osd) - //log_inode.layout.fl_pg_preferred = mds->get_nodeid() + g_conf.num_osd; // hack - // log streamer if (journaler) delete journaler; journaler = new Journaler(ino, mds->mdsmap->get_metadata_pg_pool(), CEPH_FS_ONDISK_MAGIC, mds->objecter, diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index e77811ca2e593..f8d10f63a546f 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -95,8 +95,7 @@ void OSDMap::print_summary(ostream& out) const void OSDMap::build_simple(epoch_t e, ceph_fsid_t &fsid, - int num_osd, int num_dom, int pg_bits, int pgp_bits, int lpg_bits, - int mds_local_osd) + int num_osd, int num_dom, int pg_bits, int pgp_bits, int lpg_bits) { dout(10) << "build_simple on " << num_osd << " osds with " << pg_bits << " pg bits per osd, " @@ -138,16 +137,6 @@ void OSDMap::build_simple(epoch_t e, ceph_fsid_t &fsid, set_state(i, 0); set_weight(i, CEPH_OSD_OUT); } - - if (mds_local_osd) { - set_max_osd(mds_local_osd+num_osd); - - // add mds local osds, but don't put them in the crush mapping func - for (int i=0; i& rulesets, int num_osd, diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h index 864f7ab037afe..246fa8384e844 100644 --- a/src/osd/OSDMap.h +++ b/src/osd/OSDMap.h @@ -1022,8 +1022,7 @@ private: */ void build_simple(epoch_t e, ceph_fsid_t &fsid, int num_osd, int num_dom, - int pg_bits, int pgp_bits, int lpg_bits, - int mds_local_osd); + int pg_bits, int pgp_bits, int lpg_bits); static void build_simple_crush_map(CrushWrapper& crush, map& poolsets, int num_osd, int num_dom=0); diff --git a/src/osdmaptool.cc b/src/osdmaptool.cc index 7e041fd650f14..8247917fc8eee 100644 --- a/src/osdmaptool.cc +++ b/src/osdmaptool.cc @@ -143,7 +143,7 @@ int main(int argc, const char **argv) } ceph_fsid_t fsid; memset(&fsid, 0, sizeof(ceph_fsid_t)); - osdmap.build_simple(0, fsid, num_osd, num_dom, pg_bits, pgp_bits, lpg_bits, 0); + osdmap.build_simple(0, fsid, num_osd, num_dom, pg_bits, pgp_bits, lpg_bits); modified = true; } -- 2.39.5