]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
remove ancient mds_local_osd option
authorSage Weil <sage.weil@dreamhost.com>
Sun, 6 Feb 2011 04:43:58 +0000 (20:43 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Sun, 6 Feb 2011 04:43:58 +0000 (20:43 -0800)
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 <sage.weil@dreamhost.com>
src/config.cc
src/config.h
src/mds/MDLog.cc
src/osd/OSDMap.cc
src/osd/OSDMap.h
src/osdmaptool.cc

index 3a7bdcd1bad1b089e0c47099791e91383ecadd2c..72a8820c98b0ff6d9bd6270f8791f6a6ae259d2f 100644 (file)
@@ -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),
index cff8a927749ea8549e6643dd872a64678ff85c29..7b2b865336b32c4273fc63096ad4535c82947046 100644 (file)
@@ -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;
index 999cda0f495fe4dc0581a345e07918514ecbe465..3a99f4f931421afedce16e6400ce04821f207b1c 100644 (file)
@@ -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, 
index e77811ca2e59359c2297f70c7a9cd3bc8bd7a64b..f8d10f63a546f2e6cef8f90b4d16dc41cc6fd10b 100644 (file)
@@ -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<mds_local_osd; i++) {
-      set_state(i+num_osd, 0);
-      set_weight(i+num_osd, CEPH_OSD_OUT);
-    }
-  }
 }
 
 void OSDMap::build_simple_crush_map(CrushWrapper& crush, map<int, const char*>& rulesets, int num_osd,
index 864f7ab037afe608acaee5b8c47389d0413dbef2..246fa8384e844a5998e279add5c0a8dfbaeeeea4 100644 (file)
@@ -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<int, const char*>& poolsets, int num_osd, int num_dom=0);
 
 
index 7e041fd650f144baacf3a2829d9f7c88462c1b15..8247917fc8eeebb718b00a0f527b8a941c12b3ef 100644 (file)
@@ -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;
   }