]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
config: whitespace, code ordering cleanup
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 28 Mar 2011 23:21:15 +0000 (16:21 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 28 Mar 2011 23:23:00 +0000 (16:23 -0700)
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/common/config.cc
src/common/config.h

index 36b9fbb02c4b0c6a19c953b43a7a9be150e85274..7bc8b59e8569984874334e3e8ca8437201e0d9b1 100644 (file)
@@ -722,6 +722,25 @@ md_config_t()
   }
 }
 
+md_config_t::
+~md_config_t()
+{
+  int len = sizeof(config_optionsp)/sizeof(config_option);
+  int i;
+  config_option *opt;
+
+  for (i = 0; i<len; i++) {
+    opt = &config_optionsp[i];
+    if (opt->type == OPT_STR) {
+      free(*(char **)opt->val_ptr);
+    }
+    free((void *)opt->conf_name);
+  }
+
+  delete cf;
+  cf = NULL;
+}
+
 int md_config_t::
 parse_config_files(const std::list<std::string> &conf_files)
 {
@@ -959,23 +978,3 @@ get_val(const char *key, char **buf, int len)
   // couldn't find a configuration option with key 'key'
   return -ENOENT;
 }
-
-md_config_t::
-~md_config_t()
-{
-  int len = sizeof(config_optionsp)/sizeof(config_option);
-  int i;
-  config_option *opt;
-
-  for (i = 0; i<len; i++) {
-    opt = &config_optionsp[i];
-    if (opt->type == OPT_STR) {
-      free(*(char **)opt->val_ptr);
-    }
-    free((void *)opt->conf_name);
-  }
-
-  delete cf;
-  cf = NULL;
-}
-
index 8a2cb52985f70b38edd4737d412826d5cb9de0bb..4baa50d3cd244ee8dc9fd2e4ef7621e77aba0de0 100644 (file)
@@ -1,4 +1,4 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 /*
  * Ceph - scalable distributed file system
@@ -7,9 +7,9 @@
  *
  * This is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software 
+ * License version 2.1, as published by the Free Software
  * Foundation.  See file COPYING.
- * 
+ *
  */
 
 #ifndef CEPH_CONFIG_H
@@ -51,8 +51,8 @@ struct md_config_t
   void parse_env();
   void parse_argv_part2(std::vector<const char*>& args);
   void parse_argv(std::vector<const char*>& args);
-  int get_val(const char *key, char **buf, int len);
   int set_val(const char *key, const char *val);
+  int get_val(const char *key, char **buf, int len);
 
   ConfFile *cf;
 
@@ -61,7 +61,7 @@ struct md_config_t
   int num_client;
 
   //bool mkfs;
-  
+
   const char *monmap;
   const char *mon_host;
   bool daemonize;
@@ -230,7 +230,7 @@ struct md_config_t
   int   journaler_prefetch_periods;
   double journaler_batch_interval;
   long long unsigned journaler_batch_max;
-  
+
   // mds
   uint64_t mds_max_file_size;
   int   mds_cache_size;
@@ -238,7 +238,7 @@ struct md_config_t
   int   mds_mem_max;
   float mds_dir_commit_ratio;
   int   mds_dir_max_commit_size;
-  
+
   float mds_decay_halflife;
 
   float mds_beacon_interval;
@@ -266,8 +266,8 @@ struct md_config_t
   int mds_log_max_segments;
   int mds_log_max_expiring;
   int mds_log_eopen_size;
-  
-  float mds_bal_sample_interval;  
+
+  float mds_bal_sample_interval;
   float mds_bal_replicate_threshold;
   float mds_bal_unreplicate_threshold;
   bool mds_bal_frag;
@@ -361,8 +361,8 @@ struct md_config_t
 
   float   osd_age;
   int   osd_age_time;
-  int   osd_heartbeat_interval;  
-  int   osd_mon_heartbeat_interval;  
+  int   osd_heartbeat_interval;
+  int   osd_mon_heartbeat_interval;
   int   osd_heartbeat_grace;
   int   osd_mon_report_interval_max;
   int   osd_mon_report_interval_min;
@@ -417,7 +417,7 @@ struct md_config_t
   int filestore_queue_committing_max_bytes;
   int filestore_op_threads;
   float filestore_commit_timeout;
-  
+
   // ebofs
   bool  ebofs;
   bool  ebofs_cloneable;
@@ -430,7 +430,7 @@ struct md_config_t
   unsigned ebofs_max_prefetch;
   bool  ebofs_realloc;
   bool ebofs_verify_csum_on_read;
-  
+
   // journal
   bool journal_dio;
   bool journal_block_align;
@@ -444,7 +444,7 @@ struct md_config_t
   bool  bdev_lock;
   int   bdev_iothreads;
   int   bdev_idle_kick_after_ms;
-  int   bdev_el_fw_max_ms;  
+  int   bdev_el_fw_max_ms;
   int   bdev_el_bw_max_ms;
   bool  bdev_el_bidir;
   int   bdev_iov_max;
@@ -464,7 +464,7 @@ struct md_config_t
 #endif // USE_OSBDB
 };
 
-extern md_config_t g_conf;     
+extern md_config_t g_conf;
 
 typedef enum {
        OPT_NONE, OPT_INT, OPT_LONGLONG, OPT_STR, OPT_DOUBLE, OPT_FLOAT, OPT_BOOL,