]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
config: remove some debug cruft
authorSage Weil <sage@newdream.net>
Mon, 2 Mar 2009 17:28:34 +0000 (09:28 -0800)
committerSage Weil <sage@newdream.net>
Mon, 2 Mar 2009 17:28:34 +0000 (09:28 -0800)
mkfs, tick, osd_remount_at.  rename some stuff.

src/common/debug.cc
src/config.cc
src/config.h
src/streamtest.cc

index b76b34c7f6a5bf5377ce973fd631f5493a989541..156a860c012f9b69f7582f07803731aabc82242f 100644 (file)
@@ -23,7 +23,7 @@ bool _dout_need_open = true;
 void _dout_open_log()
 {
   // logging enabled?
-  if (!(g_conf.log_dir && g_conf.file_logs)) {
+  if (!g_conf.log_dir || g_conf.log_to_stdout) {
     _dout_need_open = false;
     return;
   }
@@ -69,7 +69,7 @@ void _dout_open_log()
 
 int _dout_rename_output_file()  // after calling daemon()
 {
-  if (g_conf.log_dir && g_conf.file_logs) {
+  if (g_conf.log_dir && !g_conf.log_to_stdout) {
     char oldpath[1000];
     char hostname[80];
     gethostname(hostname, 79);
@@ -90,7 +90,7 @@ int _dout_rename_output_file()  // after calling daemon()
 
 int _dout_create_courtesy_output_symlink(const char *type, int n)
 {
-  if (g_conf.log_dir && g_conf.file_logs) {
+  if (g_conf.log_dir && !g_conf.log_to_stdout) {
     if (_dout_need_open)
       _dout_open_log();
 
index d82eed844f4ee5d5ad20932cdb4f2f53d0a0e95e..aaa0d85239b622e3ac4ddacb6a4ea6d26f13b88a 100644 (file)
@@ -192,12 +192,9 @@ md_config_t g_conf = {
   num_osd: 4,
   num_client: 1,
 
-  mkfs: false,
-
   monmap_file: ".ceph_monmap",
   mon_host: 0,
   daemonize: false,
-  file_logs: false,
 
   // profiling and debugging
   logger: true,
@@ -208,6 +205,7 @@ md_config_t g_conf = {
 
   log_dir: INSTALL_PREFIX "/var/log/ceph",        // if daemonize == true
   log_sym_dir: INSTALL_PREFIX "/var/log/ceph",    // if daemonize == true
+  log_to_stdout: true,
 
   pid_file: 0,
 
@@ -220,12 +218,8 @@ md_config_t g_conf = {
   fake_clock: false,
   fakemessenger_serialize: true,
 
-  osd_remount_at: 0,
-
   kill_after: 0,
 
-  tick: 0,
-
   debug: 0,
   debug_lockdep: 0,
   debug_mds: 1,
@@ -626,10 +620,9 @@ void parse_config_file(ConfFile *cf, bool auto_update)
   CF_READ("global", "num mon", num_mon);
   CF_READ("global", "num mds", num_mds);
   CF_READ("global", "num osd", num_osd);
-  CF_READ("global", "mkfs", mkfs);
   CF_READ_STR("global", "monmap file", monmap_file);
   CF_READ("global", "daemonize", daemonize);
-  CF_READ("global", "file logs", file_logs);
+  CF_READ("global", "log to stdout", log_to_stdout);
   CF_READ("global", "logger", logger);
   CF_READ("global", "logger interval", logger_interval);
   CF_READ_STR("global", "logger calc variance", logger_subdir);
@@ -902,11 +895,11 @@ void parse_config_options(std::vector<const char*>& args, bool open)
     else if ((strcmp(args[i], "--daemonize") == 0 ||
              strcmp(args[i], "-d") == 0) && isarg) {
       g_conf.daemonize = true;
-      g_conf.file_logs = true;
+      g_conf.log_to_stdout = false;
     } else if ((strcmp(args[i], "--foreground") == 0 ||
                strcmp(args[i], "-f") == 0) && isarg) {
       g_conf.daemonize = false;
-      g_conf.file_logs = true;
+      g_conf.log_to_stdout = false;
     }
 
     else if (strcmp(args[i], "--ms_stripe_osds") == 0)
@@ -943,12 +936,6 @@ void parse_config_options(std::vector<const char*>& args, bool open)
       i += 2;
     }
 
-    else if (strcmp(args[i], "--osd_remount_at") == 0 && isarg) 
-      g_conf.osd_remount_at = atoi(args[++i]);
-    //else if (strcmp(args[i], "--fake_osd_sync") == 0) 
-    //g_conf.fake_osd_sync = atoi(args[++i]);
-
-        
     else if (strcmp(args[i], "--log_dir") == 0 && isarg) 
       g_conf.log_dir = args[++i];
     else if (//strcmp(args[i], "-o") == 0 ||
@@ -1373,8 +1360,6 @@ void parse_config_options(std::vector<const char*>& args, bool open)
     
     else if (strcmp(args[i], "--kill_after") == 0 && isarg) 
       g_conf.kill_after = atoi(args[++i]);
-    else if (strcmp(args[i], "--tick") == 0 && isarg) 
-      g_conf.tick = atoi(args[++i]);
 
     else if (strcmp(args[i], "--file_layout_unit") == 0 && isarg) 
       g_default_file_layout.fl_stripe_unit = atoi(args[++i]);
index 1395520484904328d58dd938454404119c708bfe..cb0552050bddfaf9cce2853c5eff99bb18260205 100644 (file)
@@ -45,12 +45,11 @@ struct md_config_t {
   int num_osd;
   int num_client;
 
-  bool mkfs;
+  //bool mkfs;
   
   const char *monmap_file;
   const char *mon_host;
   bool daemonize;
-  bool file_logs;
 
   // logger (profiling)
   bool logger;
@@ -61,6 +60,7 @@ struct md_config_t {
 
   const char *log_dir;
   const char *log_sym_dir;
+  bool log_to_stdout;
 
   const char *pid_file;
 
@@ -72,12 +72,8 @@ struct md_config_t {
   bool fake_clock;
   bool fakemessenger_serialize;
 
-  int osd_remount_at;
-
   int kill_after;
 
-  int tick;
-
   int debug;
   int debug_lockdep;
   int debug_mds;
index 28c8cd1fea0703f56fb2f16ba6de3fe86fb88837..8fd6640fb912b325e2a410f290280beea99dc80e 100644 (file)
@@ -101,11 +101,6 @@ int main(int argc, const char **argv)
   ObjectStore *fs = new Ebofs(filename, journal);
   //ObjectStore *fs = new FileStore(filename);
 
-  if (g_conf.mkfs && 
-      fs->mkfs() < 0) {
-    cout << "mkfs failed" << std::endl;
-    return -1;
-  }
   if (fs->mount() < 0) {
     cout << "mount failed" << std::endl;
     return -1;