]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Rename config.h -> common/config.h
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Tue, 22 Feb 2011 16:38:45 +0000 (08:38 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Wed, 23 Feb 2011 18:17:30 +0000 (10:17 -0800)
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
155 files changed:
src/Makefile.am
src/auth/Auth.h
src/auth/AuthAuthorizeHandler.h
src/auth/AuthServiceHandler.cc
src/auth/AuthServiceHandler.h
src/auth/AuthSupported.cc
src/auth/Crypto.cc
src/auth/KeyRing.cc
src/auth/KeyRing.h
src/auth/RotatingKeyRing.cc
src/auth/RotatingKeyRing.h
src/auth/cephx/CephxClientHandler.cc
src/auth/cephx/CephxKeyServer.cc
src/auth/cephx/CephxKeyServer.h
src/auth/cephx/CephxProtocol.cc
src/auth/cephx/CephxServiceHandler.cc
src/cauthtool.cc
src/cconf.cc
src/cfuse.cc
src/client/Client.cc
src/client/SyntheticClient.cc
src/client/Trace.cc
src/client/fuse_ll.cc
src/client/hadoop/CephFSInterface.cc
src/client/ldceph.cc
src/cmds.cc
src/cmon.cc
src/common/ClassHandler.cc
src/common/ClassLibrary.cc
src/common/Clock.cc
src/common/DecayCounter.h
src/common/DoutStreambuf.cc
src/common/Finisher.cc
src/common/LogClient.cc
src/common/MemoryModel.cc
src/common/Mutex.cc
src/common/ProfLogger.cc
src/common/Thread.h
src/common/Timer.cc
src/common/WorkQueue.cc
src/common/assert.cc
src/common/buffer.cc
src/common/ceph_argparse.cc
src/common/common_init.cc
src/common/config.cc [new file with mode: 0644]
src/common/config.h [new file with mode: 0644]
src/common/debug.cc
src/common/debug.h
src/common/lockdep.cc
src/common/run_cmd.cc
src/common/signal.cc
src/common/version.cc
src/config.cc [deleted file]
src/config.h [deleted file]
src/cosd.cc
src/crushtool.cc
src/csyn.cc
src/dumpjournal.cc
src/ebofs/Allocator.cc
src/ebofs/BlockDevice.cc
src/extractosdmaps.cc
src/include/Context.h
src/include/lru.h
src/librados-config.cc
src/librados.cc
src/librbd.cc
src/mds/AnchorClient.cc
src/mds/CDir.cc
src/mds/CDir.h
src/mds/CInode.cc
src/mds/CInode.h
src/mds/Capability.h
src/mds/InoTable.cc
src/mds/Locker.cc
src/mds/LogEvent.cc
src/mds/MDBalancer.cc
src/mds/MDCache.cc
src/mds/MDLog.cc
src/mds/MDS.cc
src/mds/MDSMap.h
src/mds/MDSTable.cc
src/mds/MDSTableClient.cc
src/mds/Migrator.cc
src/mds/Server.cc
src/mds/SessionMap.cc
src/mds/SnapServer.cc
src/mds/events/EExport.h
src/mds/events/EImportFinish.h
src/mds/events/EImportStart.h
src/mds/events/ESession.h
src/mds/events/ESessions.h
src/mds/events/ETableClient.h
src/mds/events/ETableServer.h
src/mds/journal.cc
src/mds/mdstypes.h
src/mon/AuthMonitor.cc
src/mon/ClassMonitor.cc
src/mon/Elector.cc
src/mon/LogMonitor.cc
src/mon/MDSMonitor.cc
src/mon/MonCaps.cc
src/mon/MonClient.cc
src/mon/MonMap.h
src/mon/Monitor.cc
src/mon/MonitorStore.cc
src/mon/MonmapMonitor.cc
src/mon/OSDMonitor.cc
src/mon/PGMap.h
src/mon/PGMonitor.cc
src/mon/Paxos.cc
src/mon/PaxosService.cc
src/monmaptool.cc
src/msg/Dispatcher.h
src/msg/Message.cc
src/msg/Message.h
src/msg/SimpleMessenger.cc
src/msg/tcp.cc
src/objclass/class_api.cc
src/objclass/class_debug.cc
src/os/FileJournal.cc
src/os/FileStore.cc
src/os/JournalingObjectStore.cc
src/os/ObjectStore.cc
src/osd/Ager.cc
src/osd/OSD.cc
src/osd/OSDCaps.cc
src/osd/OSDMap.cc
src/osd/OSDMap.h
src/osd/PG.cc
src/osd/RAID4PG.cc
src/osd/ReplicatedPG.cc
src/osd/Watch.cc
src/osd/Watch.h
src/osdc/Filer.cc
src/osdc/Journaler.cc
src/osdc/Objecter.cc
src/osdc/rados_bencher.h
src/osdmaptool.cc
src/psim.cc
src/rados.cc
src/rbd.cc
src/rgw/rgw_admin.cc
src/test/TestDoutStreambuf.cc
src/test/TestSignalHandlers.cc
src/test/base64.cc
src/test/encoding.cc
src/test/gather.cc
src/test/old/testmpi.cc
src/test/run_cmd.cc
src/test/signals.cc
src/testcrypto.cc
src/testkeys.cc
src/testmsgr.cc
src/tools/ceph.cc
src/tools/gceph.cc

index 304586e8f35ccd2d64b6fb8cb8d07ffae459e6fd..51fee91dd1a400cbf418129e70124623cdf4c2a6 100644 (file)
@@ -530,7 +530,7 @@ libcommon_files = \
        include/ceph_hash.cc \
        include/ceph_strings.cc \
        include/ceph_frag.cc \
-       config.cc \
+       common/config.cc \
        common/page.cc \
        common/lockdep.cc \
        common/DoutStreambuf.cc \
@@ -684,7 +684,7 @@ noinst_HEADERS = \
         common/dyn_snprintf.h\
         common/run_cmd.h\
        common/safe_io.h\
-        config.h\
+        common/config.h\
         crush/CrushWrapper.h\
         crush/CrushWrapper.i\
         crush/builder.h\
index 1c73865918a9ca1f2524ebfdc86e6c2cf788fc13..f42ce9bc937e64fb214ab162de63e8616316de8c 100644 (file)
@@ -18,7 +18,7 @@
 #include "Crypto.h"
 #include "msg/msg_types.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #include <errno.h>
 
index 47da2b4217f8ede30974c4748237eb31b30367d4..40a87658471147280af8c1a22e5b5c19fba88f1a 100644 (file)
@@ -16,7 +16,7 @@
 #define CEPH_AUTHAUTHORIZEHANDLER_H
 
 #include "include/types.h"
-#include "config.h"
+#include "common/config.h"
 #include "Auth.h"
 
 class KeyRing;
index 9430d98f644cb0a3e5cbcb2cabf122ade766ed7c..36646576387f3bbb356582c5a9e25909af4987dc 100644 (file)
@@ -16,7 +16,7 @@
 #include "cephx/CephxServiceHandler.h"
 #include "none/AuthNoneServiceHandler.h"
 #include "AuthSupported.h"
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS auth
 
index 50cbd553a029d6fbdd97e5148857fff3b45cd799..b496f5ad6a1965040520e0f8b59c4f1955fa564e 100644 (file)
@@ -16,7 +16,7 @@
 #define CEPH_AUTHSERVICEHANDLER_H
 
 #include "include/types.h"
-#include "config.h"
+#include "common/config.h"
 #include "Auth.h"
 
 class KeyServer;
index 9cab32db1a5dbb59b6ad7add1c4236ffe4e196c7..91b70bd7cb6e8142497d17c9f8f6d206cbdb03f9 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "common/Mutex.h"
 #include "include/str_list.h"
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS auth
 
index e77082e7b8e761dfd45b5caca8675b6d15ce5629..466f7b760572760b286174fec25fd089ce5b61a0 100644 (file)
@@ -17,7 +17,7 @@
 #include <cryptopp/filters.h>
 
 #include "include/ceph_fs.h"
-#include "config.h"
+#include "common/config.h"
 #include "common/armor.h"
 #include "common/Clock.h"
 #include "common/hex.h"
index d2e28ea9bd2977e67f03ed5cd8598ca4353160ae..c42dea577a4600f1e2ed1d34ab411ba14430e214 100644 (file)
@@ -15,7 +15,7 @@
 #include <errno.h>
 #include <map>
 
-#include "config.h"
+#include "common/config.h"
 #include "include/str_list.h"
 #include "common/ConfUtils.h"
 
index 1f8f2563678bd4c3659efeb0dda66195f9bc68c3..2b8f9e4ef291b3be1c9e6bded5f41c60074c78fe 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_KEYRING_H
 #define CEPH_KEYRING_H
 
-#include "config.h"
+#include "common/config.h"
 
 #include "auth/Crypto.h"
 #include "auth/Auth.h"
index 1756f34591d7b0de7516de237fcfc106c558b8ae..fa484a2c2f1edeaa619564142b4211bb50662f7f 100644 (file)
@@ -1,7 +1,7 @@
 #include <errno.h>
 #include <map>
 
-#include "config.h"
+#include "common/config.h"
 #include "include/str_list.h"
 
 #include "Crypto.h"
index 21e6fbac98f4eafb101cf3fd96b1187b3a599882..28139bd6389a1c9f0f9714a5c6107800e3cc93f3 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_ROTATINGKEYRING_H
 #define CEPH_ROTATINGKEYRING_H
 
-#include "config.h"
+#include "common/config.h"
 
 #include "auth/Crypto.h"
 #include "auth/Auth.h"
index 09d3fca6dcf9364418e2266c1c6d30ce544de062..4d950538cd587d4ab98283eee7f16425efa8a464 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "../KeyRing.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS auth
 #undef dout_prefix
index 059fe91f0d241fd31fd74880193a6c4295b815f3..07455994b1321cb47021d4dbeaaa7ba237ba37ee 100644 (file)
@@ -12,7 +12,7 @@
  * 
  */
 
-#include "config.h"
+#include "common/config.h"
 
 #include "CephxKeyServer.h"
 #include "common/Timer.h"
index a78e3effb9bb5fb9f57d8d5bb7b49a64919e3215..f6e96c25f167522295f7ecdc3886ec35ad8caf3b 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_KEYSSERVER_H
 #define CEPH_KEYSSERVER_H
 
-#include "config.h"
+#include "common/config.h"
 
 #include "auth/KeyRing.h"
 #include "CephxProtocol.h"
index 6986e7924c090290dbcfdf430d427b768dbf3253..696174e977d972fa09102bed90cf6cc180bdf1ad 100644 (file)
@@ -2,7 +2,7 @@
 #include "CephxProtocol.h"
 #include "common/Clock.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS auth
 #undef dout_prefix
index 0dd523339db1bd6d770e015d65f9cdddf2245bc0..3d6a9fdf006b906a126548746633570c46df8466 100644 (file)
@@ -23,7 +23,7 @@
 #include <errno.h>
 #include <sstream>
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS auth
 #undef dout_prefix
index d0c27b331040b94f80fc986395008b774046a2e1..786d98c58caba109982b74590cd2752e897c66f1 100644 (file)
@@ -14,7 +14,7 @@
 
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "common/ConfUtils.h"
 #include "common/ceph_argparse.h"
index 47f4385b2f781429fdd0c401069c77c6a1f441de..24935de5dbad394c995bc8ef25142f97f5e6a1fe 100644 (file)
@@ -22,7 +22,7 @@
 #include "common/ConfUtils.h"
 #include "common/common_init.h"
 #include "common/ceph_argparse.h"
-#include "config.h"
+#include "common/config.h"
 #include "include/str_list.h"
 
 const char *type = NULL;
index a883e227470fbc44210512dc508ed2a0ff27acfd..cceed5bbec5a2edd1d008b2a2229230b9a6c2a80 100644 (file)
@@ -17,7 +17,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "client/Client.h"
 #include "client/fuse_ll.h"
index 0a06c3e5cec9d9fafa4d099e63db30d28dd818d4..af13a986fad2b844a55499f6e6295c817296de70 100644 (file)
@@ -28,7 +28,7 @@
 #include <iostream>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 // ceph stuff
 #include "Client.h"
@@ -59,7 +59,7 @@ using namespace std;
 
 
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS client
 #undef dout_prefix
index cfab3d0e3cb72a168a3d4b54258244208026d5d6..d29898e9d4c6fdd56c3b715ffa89b8b90ca65008 100644 (file)
@@ -17,7 +17,7 @@
 using namespace std;
 
 
-#include "config.h"
+#include "common/config.h"
 #include "SyntheticClient.h"
 #include "osdc/Objecter.h"
 #include "osdc/Filer.h"
@@ -34,7 +34,7 @@ using namespace std;
 #include <math.h>
 #include <sys/statvfs.h>
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS client
 #undef dout_prefix
index 67f86eeb18c5f2b0d2622e5f3dae7140f8b4cbf2..d425320aeb59ffb25bfd0da413ec2efa3dc0f946 100644 (file)
@@ -23,7 +23,7 @@ using namespace __gnu_cxx;
 
 #include "common/Mutex.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
index a0db0453471f1c69b903f05048435661a8c4259e..189d02422f028ee1da46c78710bcac3dd51d96c2 100644 (file)
@@ -27,7 +27,7 @@
 #include "common/safe_io.h"
 #include "include/types.h"
 #include "Client.h"
-#include "config.h"
+#include "common/config.h"
 
 static Client *client;
 
index 5899cee22d9a3e33d935154e67b35c6129c6e3f6..b84932483d2dc5bcd038c778e7d58a60c66c45dd 100644 (file)
@@ -2,7 +2,7 @@
 #include "CephFSInterface.h"
 
 #include "client/libceph.h"
-#include "config.h"
+#include "common/config.h"
 #include "msg/SimpleMessenger.h"
 #include "common/Timer.h"
 
index 9d6faa4f10495b90821eb7e355d6daf6de51ff21..877ba894ad5938b18dc2c1b433de20a03866182a 100644 (file)
@@ -23,7 +23,7 @@ using namespace std;
 
 
 // ceph stuff
-#include "config.h"
+#include "common/config.h"
 #include "client/Client.h"
 #include "msg/SimpleMessenger.h"
 
index 7dba179b77ca184ebe0d63eebf3aec99ccec14d9..03de4414781acdefeb0168edde0a4349753e5a31 100644 (file)
@@ -21,7 +21,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "mon/MonMap.h"
 #include "mds/MDS.h"
index 8fe95e41d7f438118b7770a160073979b734406e..8093ed5f3c5e8beac128c778eec93501a7faaf42 100644 (file)
@@ -21,7 +21,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "mon/MonMap.h"
 #include "mon/Monitor.h"
index 405ab7388e44edb3e6178c70a1d309c78917a484..4146cbf014407c31bb7d9aa71783bc4215d01466 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <map>
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS osd
 #undef dout_prefix
index 8b5d47d16b2b57cdba09baea5dfd07e0de03ffa2..2cea0a127b9dc1c7cbf037ac1d938329794b12a4 100644 (file)
@@ -2,7 +2,7 @@
 #include "common/ClassVersion.h"
 #include "include/ClassLibrary.h"
 
-#include "config.h"
+#include "common/config.h"
 
 ClassInfo *ClassVersionMap::get(ClassVersion& ver)
 {
index 68d3ce153055fe2710021c5c55c875ee657bde93..6d5e1255613bfbf671e27957b8b862a4540185c5 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 
-#include "config.h"
+#include "common/config.h"
 #include "Clock.h"
 
 // public
index 763dc0f33db9d63972a1441ca67c06a7ebb4759f..0f20fb884b7c467c771f65234a89c32f3762ad58 100644 (file)
@@ -18,7 +18,7 @@
 #include <math.h>
 #include "Clock.h"
 
-#include "config.h"
+#include "common/config.h"
 
 /**
  *
index b30d536d231549ddb8abc273d8a110c101bbd7e7..9061b2d70b7b737d1852feb7cb839afa12319d6c 100644 (file)
@@ -12,7 +12,7 @@
  *
  */
 
-#include "config.h"
+#include "common/config.h"
 #include "common/DoutStreambuf.h"
 #include "common/errno.h"
 #include "common/Mutex.h"
index 7315b9c4f48d636b8e8c03ddf1776194afb6a3c3..5520b98f2588441f847a65c45155de52a13571fd 100644 (file)
@@ -1,5 +1,5 @@
 
-#include "config.h"
+#include "common/config.h"
 #include "Finisher.h"
 
 #include "common/debug.h"
index 26f054411d0d4288a68251cfbf478fbc03e00f92..c0858314c41049c735455d21ccc004a516d23b20 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "common/LogClient.h"
 
-#include "config.h"
+#include "common/config.h"
 
 /*
  * Given a clog log_type, return the equivalent syslog priority
index 34abc220ca11ac918b9fa7253bbb3b3e451b2a22..c17a06a07c9acb1cf458039a936caa1ba359507d 100644 (file)
@@ -1,7 +1,7 @@
 
 #include "include/types.h"
 #include "MemoryModel.h"
-#include "config.h"
+#include "common/config.h"
 #include "debug.h"
 
 #include <fstream>
index 0d0b1589082af617cb4001e92bd79e6686eb2957..ee91fa3814d0f6c0d5ddf1fa14c5ff9a4e0ddb54 100644 (file)
@@ -11,7 +11,7 @@ int g_lockdep = 0;
 
 #include <ext/hash_map>
 
-#include "config.h"
+#include "common/config.h"
 
 #undef dout
 #undef derr
index 2339ecf3c932c4bf1f469cb5f26e45b4e388d1ad..731ef44d1ee33855d11d188d16ff7785eba5068f 100644 (file)
@@ -23,7 +23,7 @@
 #include <memory>
 #include "Clock.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #include <sys/stat.h>
 #include <sys/types.h>
index a6de02286754defc55d776e2a4efb00e59e340dc..b5907e6bae32edd9d464cd50304a7ec0712b5adc 100644 (file)
@@ -17,7 +17,7 @@
 #define CEPH_THREAD_H
 
 #include "common/signal.h"
-#include "config.h"
+#include "common/config.h"
 #include "include/atomic.h"
 
 #include <errno.h>
index 9980790b36e72aa4c1d613f5e38ad0878cace3af..01ee16379ddb394ab3db18c1fb7ad3e0771c8c23 100644 (file)
@@ -17,7 +17,7 @@
 #include "Thread.h"
 #include "Timer.h"
 
-#include "config.h"
+#include "common/config.h"
 #include "include/Context.h"
 
 #define DOUT_SUBSYS timer
index a3f67e0a0d2257e63e091942058263b05b3bb7a8..97e176253b3a8db4b72b6ca59f74e549c07cb0da 100644 (file)
@@ -15,7 +15,7 @@
 #include "include/types.h"
 #include "WorkQueue.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS tp
 #undef dout_prefix
index c4a5c744eb0a2e1a89029733786f6adad9f9db55..fa03a7dfcfa93a455213b9a2c91733d9d807f137 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "BackTrace.h"
 #include "common/debug.h"
-#include "config.h"
+#include "common/config.h"
 #include "include/assert.h"
 
 static bool dout_trylock(void)
index f4567a8236cba90b660b59ecee6aa2f08ca9b0a6..950527cff23dec18e9135afdb820a50fe69aed95 100644 (file)
@@ -16,7 +16,7 @@
 #include "armor.h"
 #include "common/errno.h"
 #include "common/safe_io.h"
-#include "config.h"
+#include "common/config.h"
 #include "include/Spinlock.h"
 #include "include/types.h"
 
index af7145810813622960e90ab7a764c7a21c1891ed..aa4c56d115bd1c7328d965762079f629c235408e 100644 (file)
@@ -17,7 +17,7 @@
 #include "common/common_init.h"
 #include "common/ConfUtils.h"
 #include "common/version.h"
-#include "config.h"
+#include "common/config.h"
 #include "include/intarith.h"
 #include "include/str_list.h"
 #include "msg/msg_types.h"
index f57d9940f2bd23c4c76665be6fdeab9105eb802d..300ef9c93212cb5f3abd120223e057fec78f317b 100644 (file)
@@ -18,7 +18,7 @@
 #include "common/safe_io.h"
 #include "common/signal.h"
 #include "common/version.h"
-#include "config.h"
+#include "common/config.h"
 #include "common/common_init.h"
 #include "common/errno.h"
 #include "include/color.h"
diff --git a/src/common/config.cc b/src/common/config.cc
new file mode 100644 (file)
index 0000000..946e99f
--- /dev/null
@@ -0,0 +1,911 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
+ *
+ * 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
+ * Foundation.  See file COPYING.
+ *
+ */
+
+#include "auth/Auth.h"
+#include "common/BackTrace.h"
+#include "common/Clock.h"
+#include "common/ConfUtils.h"
+#include "common/ProfLogger.h"
+#include "common/common_init.h"
+#include "common/dyn_snprintf.h"
+#include "common/version.h"
+#include "common/config.h"
+#include "include/atomic.h"
+#include "include/str_list.h"
+#include "include/types.h"
+#include "msg/msg_types.h"
+#include "osd/osd_types.h"
+
+#include <fcntl.h>
+#include <fstream>
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+/* Don't use standard Ceph logging in this file.
+ * We can't use logging until it's initialized, and a lot of the necessary
+ * initialization happens here.
+ */
+#undef dout
+#undef pdout
+#undef derr
+#undef generic_dout
+#undef dendl
+
+/* The Ceph configuration. */
+md_config_t g_conf __attribute__((init_priority(103)));
+
+#define _STR(x) #x
+#define STRINGIFY(x) _STR(x)
+
+
+#define OPTION_OPT_STR(section, name, schar, type, def_val) \
+       { STRINGIFY(section), NULL, STRINGIFY(name), \
+          &g_conf.name, def_val, 0, 0, type, schar }
+
+#define OPTION_OPT_ADDR(section, name, schar, type, def_val) \
+       { STRINGIFY(section), NULL, STRINGIFY(name), \
+          &g_conf.name, def_val, 0, 0, type, schar }
+
+#define OPTION_OPT_LONGLONG(section, name, schar, type, def_val) \
+       { STRINGIFY(section), NULL, STRINGIFY(name), \
+          &g_conf.name, 0, def_val, 0, type, schar }
+#define OPTION_OPT_INT OPTION_OPT_LONGLONG
+#define OPTION_OPT_BOOL OPTION_OPT_INT
+
+#define OPTION_OPT_DOUBLE(section, name, schar, type, def_val) \
+       { STRINGIFY(section), NULL, STRINGIFY(name), \
+          &g_conf.name, 0, 0, def_val, type, schar }
+#define OPTION_OPT_FLOAT OPTION_OPT_DOUBLE
+
+#define OPTION(name, schar, type, def_val) OPTION_##type("global", name, schar, type, def_val)
+
+#define OPTION_ALT(section, conf_name, name, schar, type, def_val) \
+       { STRINGIFY(section), NULL, STRINGIFY(conf_name), \
+         &g_conf.name, STRINGIFY(def_val), type, schar }
+
+struct config_option config_optionsp[] = {
+       OPTION(host, 0, OPT_STR, "localhost"),
+       OPTION(public_addr, 0, OPT_ADDR, ""),
+       OPTION(cluster_addr, 0, OPT_ADDR, ""),
+       OPTION(num_client, 0, OPT_INT, 1),
+       OPTION(monmap, 'M', OPT_STR, 0),
+       OPTION(mon_host, 'm', OPT_STR, 0),
+       OPTION(daemonize, 'd', OPT_BOOL, false),
+        OPTION(tcmalloc_profiler_run, 0, OPT_BOOL, false),
+        OPTION(profiler_allocation_interval, 0, OPT_INT, 1073741824),
+        OPTION(profiler_highwater_interval, 0, OPT_INT, 104857600),
+       OPTION(profiling_logger, 0, OPT_BOOL, false),
+       OPTION(profiling_logger_interval, 0, OPT_INT, 1),
+       OPTION(profiling_logger_calc_variance, 0, OPT_BOOL, false),
+       OPTION(profiling_logger_subdir, 0, OPT_STR, 0),
+       OPTION(profiling_logger_dir, 0, OPT_STR, "/var/log/ceph/stat"),
+       OPTION(log_file, 0, OPT_STR, 0),
+       OPTION(log_dir, 0, OPT_STR, "/var/log/ceph"),
+       OPTION(log_sym_dir, 0, OPT_STR, 0),
+       OPTION(log_sym_history, 0, OPT_INT, 10),
+       OPTION(log_to_stderr, 0, OPT_INT, LOG_TO_STDERR_SOME),
+       OPTION(log_to_syslog, 0, OPT_BOOL, false),
+       OPTION(log_per_instance, 0, OPT_BOOL, false),
+       OPTION(log_to_file, 0, OPT_BOOL, true),
+       OPTION(clog_to_monitors, 0, OPT_BOOL, true),
+       OPTION(clog_to_syslog, 0, OPT_BOOL, false),
+       OPTION(pid_file, 0, OPT_STR, "/var/run/ceph/$type.$id.pid"),
+       OPTION(conf, 'c', OPT_STR, "/etc/ceph/ceph.conf, ~/.ceph/config, ceph.conf"),
+       OPTION(chdir, 0, OPT_STR, "/"),
+       OPTION(kill_after, 0, OPT_INT, 0),
+       OPTION(max_open_files, 0, OPT_LONGLONG, 0),
+       OPTION(debug, 0, OPT_INT, 0),
+       OPTION(debug_lockdep, 0, OPT_INT, 0),
+       OPTION(debug_mds, 0, OPT_INT, 1),
+       OPTION(debug_mds_balancer, 0, OPT_INT, 1),
+       OPTION(debug_mds_log, 0, OPT_INT, 1),
+       OPTION(debug_mds_log_expire, 0, OPT_INT, 1),
+       OPTION(debug_mds_migrator, 0, OPT_INT, 1),
+       OPTION(debug_buffer, 0, OPT_INT, 0),
+       OPTION(debug_timer, 0, OPT_INT, 0),
+       OPTION(debug_filer, 0, OPT_INT, 0),
+       OPTION(debug_objecter, 0, OPT_INT, 0),
+       OPTION(debug_rados, 0, OPT_INT, 0),
+       OPTION(debug_rbd, 0, OPT_INT, 0),
+       OPTION(debug_journaler, 0, OPT_INT, 0),
+       OPTION(debug_objectcacher, 0, OPT_INT, 0),
+       OPTION(debug_client, 0, OPT_INT, 0),
+       OPTION(debug_osd, 0, OPT_INT, 0),
+       OPTION(debug_ebofs, 0, OPT_INT, 1),
+       OPTION(debug_filestore, 0, OPT_INT, 1),
+       OPTION(debug_journal, 0, OPT_INT, 1),
+       OPTION(debug_bdev, 0, OPT_INT, 1),         // block device
+       OPTION(debug_ms, 0, OPT_INT, 0),
+       OPTION(debug_mon, 0, OPT_INT, 1),
+       OPTION(debug_monc, 0, OPT_INT, 0),
+       OPTION(debug_paxos, 0, OPT_INT, 0),
+       OPTION(debug_tp, 0, OPT_INT, 0),
+       OPTION(debug_auth, 0, OPT_INT, 1),
+       OPTION(debug_finisher, 0, OPT_INT, 1),
+       OPTION(key, 0, OPT_STR, ""),
+       OPTION(keyfile, 'K', OPT_STR, ""),
+       OPTION(keyring, 'k', OPT_STR, "/etc/ceph/keyring,/etc/ceph/keyring.bin"),
+       OPTION(ms_tcp_nodelay, 0, OPT_BOOL, true),
+       OPTION(ms_initial_backoff, 0, OPT_DOUBLE, .2),
+       OPTION(ms_max_backoff, 0, OPT_DOUBLE, 15.0),
+       OPTION(ms_nocrc, 0, OPT_BOOL, false),
+       OPTION(ms_die_on_bad_msg, 0, OPT_BOOL, false),
+       OPTION(ms_dispatch_throttle_bytes, 0, OPT_INT, 100 << 20),
+       OPTION(ms_bind_ipv6, 0, OPT_BOOL, false),
+        OPTION(ms_rwthread_stack_bytes, 0, OPT_INT, 1024 << 10),
+        OPTION(ms_tcp_read_timeout, 0, OPT_LONGLONG, 900),
+       OPTION(ms_inject_socket_failures, 0, OPT_LONGLONG, 0),
+       OPTION(mon_data, 0, OPT_STR, ""),
+       OPTION(mon_tick_interval, 0, OPT_INT, 5),
+       OPTION(mon_subscribe_interval, 0, OPT_DOUBLE, 300),
+       OPTION(mon_osd_down_out_interval, 0, OPT_INT, 300), // seconds
+       OPTION(mon_lease, 0, OPT_FLOAT, 5),                 // lease interval
+       OPTION(mon_lease_renew_interval, 0, OPT_FLOAT, 3), // on leader, to renew the lease
+       OPTION(mon_lease_ack_timeout, 0, OPT_FLOAT, 10.0), // on leader, if lease isn't acked by all peons
+       OPTION(mon_clock_drift_allowed, 0, OPT_FLOAT, .010), // allowed clock drift between monitors
+       OPTION(mon_clock_drift_warn_backoff, 0, OPT_FLOAT, 5), // exponential backoff for clock drift warnings
+       OPTION(mon_accept_timeout, 0, OPT_FLOAT, 10.0),    // on leader, if paxos update isn't accepted
+       OPTION(mon_pg_create_interval, 0, OPT_FLOAT, 30.0), // no more than every 30s
+       OPTION(mon_osd_full_ratio, 0, OPT_INT, 95), // what % full makes an OSD "full"
+       OPTION(mon_osd_nearfull_ratio, 0, OPT_INT, 85), // what % full makes an OSD near full
+       OPTION(mon_globalid_prealloc, 0, OPT_INT, 100),   // how many globalids to prealloc
+       OPTION(mon_osd_report_timeout, 0, OPT_INT, 900),    // grace period before declaring unresponsive OSDs dead
+       OPTION(paxos_propose_interval, 0, OPT_DOUBLE, 1.0),  // gather updates for this long before proposing a map update
+       OPTION(paxos_min_wait, 0, OPT_DOUBLE, 0.05),  // min time to gather updates for after period of inactivity
+       OPTION(paxos_observer_timeout, 0, OPT_DOUBLE, 5*60), // gather updates for this long before proposing a map update
+       OPTION(auth_supported, 0, OPT_STR, "none"),
+       OPTION(auth_mon_ticket_ttl, 0, OPT_DOUBLE, 60*60*12),
+       OPTION(auth_service_ticket_ttl, 0, OPT_DOUBLE, 60*60),
+       OPTION(mon_client_hunt_interval, 0, OPT_DOUBLE, 3.0),   // try new mon every N seconds until we connect
+       OPTION(mon_client_ping_interval, 0, OPT_DOUBLE, 10.0),  // ping every N seconds
+       OPTION(client_cache_size, 0, OPT_INT, 16384),
+       OPTION(client_cache_mid, 0, OPT_FLOAT, .75),
+       OPTION(client_cache_stat_ttl, 0, OPT_INT, 0), // seconds until cached stat results become invalid
+       OPTION(client_cache_readdir_ttl, 0, OPT_INT, 1),  // 1 second only
+       OPTION(client_use_random_mds, 0, OPT_BOOL, false),
+       OPTION(client_mount_timeout, 0, OPT_DOUBLE, 30.0),
+       OPTION(client_unmount_timeout, 0, OPT_DOUBLE, 10.0),
+       OPTION(client_tick_interval, 0, OPT_DOUBLE, 1.0),
+       OPTION(client_trace, 0, OPT_STR, 0),
+       OPTION(client_readahead_min, 0, OPT_LONGLONG, 128*1024),  // readahead at _least_ this much.
+       OPTION(client_readahead_max_bytes, 0, OPT_LONGLONG, 0),  //8 * 1024*1024,
+       OPTION(client_readahead_max_periods, 0, OPT_LONGLONG, 4),  // as multiple of file layout period (object size * num stripes)
+       OPTION(client_snapdir, 0, OPT_STR, ".snap"),
+       OPTION(client_mountpoint, 'r', OPT_STR, "/"),
+       OPTION(client_notify_timeout, 0, OPT_INT, 10), // in seconds
+       OPTION(client_oc, 0, OPT_BOOL, true),
+       OPTION(client_oc_size, 0, OPT_INT, 1024*1024* 200),    // MB * n
+       OPTION(client_oc_max_dirty, 0, OPT_INT, 1024*1024* 100),    // MB * n  (dirty OR tx.. bigish)
+       OPTION(client_oc_target_dirty, 0, OPT_INT, 1024*1024* 8), // target dirty (keep this smallish)
+       // note: the max amount of "in flight" dirty data is roughly (max - target)
+       OPTION(client_oc_max_sync_write, 0, OPT_LONGLONG, 128*1024),   // sync writes >= this use wrlock
+       OPTION(objecter_tick_interval, 0, OPT_DOUBLE, 5.0),
+       OPTION(objecter_mon_retry_interval, 0, OPT_DOUBLE, 5.0),
+       OPTION(objecter_timeout, 0, OPT_DOUBLE, 10.0),    // before we ask for a map
+       OPTION(objecter_inflight_op_bytes, 0, OPT_LONGLONG, 1024*1024*100), //max in-flight data (both directions)
+       OPTION(journaler_allow_split_entries, 0, OPT_BOOL, true),
+       OPTION(journaler_safe, 0, OPT_BOOL, true),  // wait for COMMIT on journal writes
+       OPTION(journaler_write_head_interval, 0, OPT_INT, 15),
+       OPTION(journaler_cache, 0, OPT_BOOL, false), // cache writes for later readback
+       OPTION(journaler_prefetch_periods, 0, OPT_INT, 50),   // * journal object size (1~MB? see above)
+       OPTION(journaler_batch_interval, 0, OPT_DOUBLE, .001),   // seconds.. max add'l latency we artificially incur
+       OPTION(journaler_batch_max, 0, OPT_LONGLONG, 0),  // max bytes we'll delay flushing; disable, for now....
+       OPTION(mds_max_file_size, 0, OPT_LONGLONG, 1ULL << 40),
+       OPTION(mds_cache_size, 0, OPT_INT, 100000),
+       OPTION(mds_cache_mid, 0, OPT_FLOAT, .7),
+       OPTION(mds_mem_max, 0, OPT_INT, 1048576),        // KB
+       OPTION(mds_dir_commit_ratio, 0, OPT_FLOAT, .5),
+       OPTION(mds_dir_max_commit_size, 0, OPT_INT, 90), // MB
+       OPTION(mds_decay_halflife, 0, OPT_FLOAT, 5),
+       OPTION(mds_beacon_interval, 0, OPT_FLOAT, 4),
+       OPTION(mds_beacon_grace, 0, OPT_FLOAT, 15),
+       OPTION(mds_blacklist_interval, 0, OPT_FLOAT, 24.0*60.0),  // how long to blacklist failed nodes
+       OPTION(mds_session_timeout, 0, OPT_FLOAT, 60),    // cap bits and leases time out if client idle
+       OPTION(mds_session_autoclose, 0, OPT_FLOAT, 300), // autoclose idle session
+       OPTION(mds_reconnect_timeout, 0, OPT_FLOAT, 45),  // seconds to wait for clients during mds restart
+                                                         //  make it (mds_session_timeout - mds_beacon_grace)
+       OPTION(mds_tick_interval, 0, OPT_FLOAT, 5),
+       OPTION(mds_dirstat_min_interval, 0, OPT_FLOAT, 1),    // try to avoid propagating more often than this
+       OPTION(mds_scatter_nudge_interval, 0, OPT_FLOAT, 5),  // how quickly dirstat changes propagate up the hierarchy
+       OPTION(mds_client_prealloc_inos, 0, OPT_INT, 1000),
+       OPTION(mds_early_reply, 0, OPT_BOOL, true),
+       OPTION(mds_use_tmap, 0, OPT_BOOL, true),        // use trivialmap for dir updates
+       OPTION(mds_default_dir_hash, 0, OPT_INT, CEPH_STR_HASH_RJENKINS),
+       OPTION(mds_log, 0, OPT_BOOL, true),
+       OPTION(mds_log_unsafe, 0, OPT_BOOL, false),      // only wait for log sync, when it's mostly safe to do so
+       OPTION(mds_log_skip_corrupt_events, 0, OPT_BOOL, false),
+       OPTION(mds_log_max_events, 0, OPT_INT, -1),
+       OPTION(mds_log_max_segments, 0, OPT_INT, 30),  // segment size defined by FileLayout, above
+       OPTION(mds_log_max_expiring, 0, OPT_INT, 20),
+       OPTION(mds_log_eopen_size, 0, OPT_INT, 100),   // # open inodes per log entry
+       OPTION(mds_bal_sample_interval, 0, OPT_FLOAT, 3.0),  // every 5 seconds
+       OPTION(mds_bal_replicate_threshold, 0, OPT_FLOAT, 8000),
+       OPTION(mds_bal_unreplicate_threshold, 0, OPT_FLOAT, 0),
+       OPTION(mds_bal_frag, 0, OPT_BOOL, false),
+       OPTION(mds_bal_split_size, 0, OPT_INT, 10000),
+       OPTION(mds_bal_split_rd, 0, OPT_FLOAT, 25000),
+       OPTION(mds_bal_split_wr, 0, OPT_FLOAT, 10000),
+       OPTION(mds_bal_split_bits, 0, OPT_INT, 3),
+       OPTION(mds_bal_merge_size, 0, OPT_INT, 50),
+       OPTION(mds_bal_merge_rd, 0, OPT_FLOAT, 1000),
+       OPTION(mds_bal_merge_wr, 0, OPT_FLOAT, 1000),
+       OPTION(mds_bal_interval, 0, OPT_INT, 10),           // seconds
+       OPTION(mds_bal_fragment_interval, 0, OPT_INT, 5),      // seconds
+       OPTION(mds_bal_idle_threshold, 0, OPT_FLOAT, 0),
+       OPTION(mds_bal_max, 0, OPT_INT, -1),
+       OPTION(mds_bal_max_until, 0, OPT_INT, -1),
+       OPTION(mds_bal_mode, 0, OPT_INT, 0),
+       OPTION(mds_bal_min_rebalance, 0, OPT_FLOAT, .1),  // must be this much above average before we export anything
+       OPTION(mds_bal_min_start, 0, OPT_FLOAT, .2),      // if we need less than this, we don't do anything
+       OPTION(mds_bal_need_min, 0, OPT_FLOAT, .8),       // take within this range of what we need
+       OPTION(mds_bal_need_max, 0, OPT_FLOAT, 1.2),
+       OPTION(mds_bal_midchunk, 0, OPT_FLOAT, .3),       // any sub bigger than this taken in full
+       OPTION(mds_bal_minchunk, 0, OPT_FLOAT, .001),     // never take anything smaller than this
+       OPTION(mds_bal_target_removal_min, 0, OPT_INT, 5), // min balance iterations before old target is removed
+       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_thrash_exports, 0, OPT_INT, 0),
+       OPTION(mds_thrash_fragments, 0, OPT_INT, 0),
+       OPTION(mds_dump_cache_on_map, 0, OPT_BOOL, false),
+       OPTION(mds_dump_cache_after_rejoin, 0, OPT_BOOL, false),
+       OPTION(mds_verify_scatter, 0, OPT_BOOL, false),
+       OPTION(mds_debug_scatterstat, 0, OPT_BOOL, false),
+       OPTION(mds_debug_frag, 0, OPT_BOOL, false),
+       OPTION(mds_kill_mdstable_at, 0, OPT_INT, 0),
+       OPTION(mds_kill_export_at, 0, OPT_INT, 0),
+       OPTION(mds_kill_import_at, 0, OPT_INT, 0),
+       OPTION(mds_kill_rename_at, 0, OPT_INT, 0),
+       OPTION(mds_wipe_sessions, 0, OPT_BOOL, 0),
+       OPTION(mds_wipe_ino_prealloc, 0, OPT_BOOL, 0),
+       OPTION(mds_skip_ino, 0, OPT_INT, 0),
+       OPTION(max_mds, 0, OPT_INT, 1),
+       OPTION(mds_standby_for_name, 0, OPT_STR, ""),
+       OPTION(mds_standby_for_rank, 0, OPT_INT, -1),
+       OPTION(mds_standby_replay, 0, OPT_BOOL, false),
+       OPTION(osd_data, 0, OPT_STR, ""),
+       OPTION(osd_journal, 0, OPT_STR, ""),
+       OPTION(osd_journal_size, 0, OPT_INT, 0),         // in mb
+       OPTION(osd_max_write_size, 0, OPT_INT, 90),
+       OPTION(osd_balance_reads, 0, OPT_BOOL, false),
+       OPTION(osd_flash_crowd_iat_threshold, 0, OPT_INT, 0),
+       OPTION(osd_flash_crowd_iat_alpha, 0, OPT_DOUBLE, 0.125),
+       OPTION(osd_shed_reads, 0, OPT_INT, false),     // forward from primary to replica
+       OPTION(osd_shed_reads_min_latency, 0, OPT_DOUBLE, .01),       // min local latency
+       OPTION(osd_shed_reads_min_latency_diff, 0, OPT_DOUBLE, .01),  // min latency difference
+       OPTION(osd_shed_reads_min_latency_ratio, 0, OPT_DOUBLE, 1.5),  // 1.2 == 20% higher than peer
+       OPTION(osd_client_message_size_cap, 0, OPT_LONGLONG, 500*1024L*1024L), // default to 200MB client data allowed in-memory
+       OPTION(osd_stat_refresh_interval, 0, OPT_DOUBLE, .5),
+       OPTION(osd_pg_bits, 0, OPT_INT, 9),  // bits per osd
+       OPTION(osd_pgp_bits, 0, OPT_INT, 6),  // bits per osd
+       OPTION(osd_lpg_bits, 0, OPT_INT, 2),  // bits per osd
+       OPTION(osd_pg_layout, 0, OPT_INT, CEPH_PG_LAYOUT_CRUSH),
+       OPTION(osd_min_rep, 0, OPT_INT, 1),
+       OPTION(osd_max_rep, 0, OPT_INT, 10),
+       OPTION(osd_min_raid_width, 0, OPT_INT, 3),
+       OPTION(osd_max_raid_width, 0, OPT_INT, 2),
+       OPTION(osd_pool_default_crush_rule, 0, OPT_INT, 0),
+       OPTION(osd_pool_default_size, 0, OPT_INT, 2),
+       OPTION(osd_pool_default_pg_num, 0, OPT_INT, 8),
+       OPTION(osd_pool_default_pgp_num, 0, OPT_INT, 8),
+       OPTION(osd_op_threads, 0, OPT_INT, 2),    // 0 == no threading
+       OPTION(osd_max_opq, 0, OPT_INT, 10),
+       OPTION(osd_disk_threads, 0, OPT_INT, 1),
+       OPTION(osd_recovery_threads, 0, OPT_INT, 1),
+       OPTION(osd_age, 0, OPT_FLOAT, .8),
+       OPTION(osd_age_time, 0, OPT_INT, 0),
+       OPTION(osd_heartbeat_interval, 0, OPT_INT, 1),
+       OPTION(osd_mon_heartbeat_interval, 0, OPT_INT, 30),  // if no peers, ping monitor
+       OPTION(osd_heartbeat_grace, 0, OPT_INT, 20),
+       OPTION(osd_mon_report_interval_max, 0, OPT_INT, 120),
+       OPTION(osd_mon_report_interval_min, 0, OPT_INT, 5),  // pg stats, failures, up_thru, boot.
+       OPTION(osd_min_down_reporters, 0, OPT_INT, 1),   // number of OSDs who need to report a down OSD for it to count
+       OPTION(osd_min_down_reports, 0, OPT_INT, 3),     // number of times a down OSD must be reported for it to count
+       OPTION(osd_replay_window, 0, OPT_INT, 45),
+       OPTION(osd_preserve_trimmed_log, 0, OPT_BOOL, true),
+       OPTION(osd_recovery_delay_start, 0, OPT_FLOAT, 15),
+       OPTION(osd_recovery_max_active, 0, OPT_INT, 5),
+       OPTION(osd_recovery_max_chunk, 0, OPT_LONGLONG, 1<<20),  // max size of push chunk
+       OPTION(osd_recovery_forget_lost_objects, 0, OPT_BOOL, false),   // off for now
+       OPTION(osd_max_scrubs, 0, OPT_INT, 1),
+       OPTION(osd_scrub_load_threshold, 0, OPT_FLOAT, 0.5),
+       OPTION(osd_scrub_min_interval, 0, OPT_FLOAT, 300),
+       OPTION(osd_scrub_max_interval, 0, OPT_FLOAT, 60*60*24),   // once a day
+       OPTION(osd_auto_weight, 0, OPT_BOOL, false),
+       OPTION(osd_class_error_timeout, 0, OPT_DOUBLE, 60.0),  // seconds
+       OPTION(osd_class_timeout, 0, OPT_DOUBLE, 60*60.0), // seconds
+       OPTION(osd_class_tmp, 0, OPT_STR, "/var/lib/ceph/tmp"),
+       OPTION(osd_check_for_log_corruption, 0, OPT_BOOL, false),
+       OPTION(osd_use_stale_snap, 0, OPT_BOOL, false),
+       OPTION(osd_max_notify_timeout, 0, OPT_INT, 30), // max notify timeout in seconds
+       OPTION(filestore, 0, OPT_BOOL, false),
+       OPTION(filestore_max_sync_interval, 0, OPT_DOUBLE, 5),    // seconds
+       OPTION(filestore_min_sync_interval, 0, OPT_DOUBLE, .01),  // seconds
+       OPTION(filestore_fake_attrs, 0, OPT_BOOL, false),
+       OPTION(filestore_fake_collections, 0, OPT_BOOL, false),
+       OPTION(filestore_dev, 0, OPT_STR, 0),
+       OPTION(filestore_btrfs_trans, 0, OPT_BOOL, false),
+       OPTION(filestore_btrfs_snap, 0, OPT_BOOL, true),
+       OPTION(filestore_btrfs_clone_range, 0, OPT_BOOL, true),
+       OPTION(filestore_fsync_flushes_journal_data, 0, OPT_BOOL, false),
+       OPTION(filestore_flusher, 0, OPT_BOOL, true),
+       OPTION(filestore_flusher_max_fds, 0, OPT_INT, 512),
+       OPTION(filestore_sync_flush, 0, OPT_BOOL, false),
+       OPTION(filestore_journal_parallel, 0, OPT_BOOL, false),
+       OPTION(filestore_journal_writeahead, 0, OPT_BOOL, false),
+       OPTION(filestore_journal_trailing, 0, OPT_BOOL, false),
+       OPTION(filestore_queue_max_ops, 0, OPT_INT, 500),
+       OPTION(filestore_queue_max_bytes, 0, OPT_INT, 100 << 20),
+       OPTION(filestore_op_threads, 0, OPT_INT, 2),
+       OPTION(filestore_commit_timeout, 0, OPT_FLOAT, 600),
+       OPTION(ebofs, 0, OPT_BOOL, false),
+       OPTION(ebofs_cloneable, 0, OPT_BOOL, true),
+       OPTION(ebofs_verify, 0, OPT_BOOL, false),
+       OPTION(ebofs_commit_ms, 0, OPT_INT, 200),       // 0 = no forced commit timeout (for debugging/tracing)
+       OPTION(ebofs_oc_size, 0, OPT_INT, 10000),      // onode cache
+       OPTION(ebofs_cc_size, 0, OPT_INT, 10000),      // cnode cache
+       OPTION(ebofs_bc_size, 0, OPT_LONGLONG, 50*256), // 4k blocks, *256 for MB
+       OPTION(ebofs_bc_max_dirty, 0, OPT_LONGLONG, 30*256), // before write() will block
+       OPTION(ebofs_max_prefetch, 0, OPT_INT, 1000), // 4k blocks
+       OPTION(ebofs_realloc, 0, OPT_BOOL, false),    // hrm, this can cause bad fragmentation, don't use!
+       OPTION(ebofs_verify_csum_on_read, 0, OPT_BOOL, true),
+       OPTION(journal_dio, 0, OPT_BOOL, true),
+       OPTION(journal_block_align, 0, OPT_BOOL, true),
+       OPTION(journal_max_write_bytes, 0, OPT_INT, 10 << 20),
+       OPTION(journal_max_write_entries, 0, OPT_INT, 100),
+       OPTION(journal_queue_max_ops, 0, OPT_INT, 500),
+       OPTION(journal_queue_max_bytes, 0, OPT_INT, 100 << 20),
+       OPTION(journal_align_min_size, 0, OPT_INT, 64 << 10),  // align data payloads >= this.
+       OPTION(bdev_lock, 0, OPT_BOOL, true),
+       OPTION(bdev_iothreads, 0, OPT_INT, 1),         // number of ios to queue with kernel
+       OPTION(bdev_idle_kick_after_ms, 0, OPT_INT, 100),  // ms
+       OPTION(bdev_el_fw_max_ms, 0, OPT_INT, 10000),      // restart elevator at least once every 1000 ms
+       OPTION(bdev_el_bw_max_ms, 0, OPT_INT, 3000),       // restart elevator at least once every 300 ms
+       OPTION(bdev_el_bidir, 0, OPT_BOOL, false),          // bidirectional elevator?
+       OPTION(bdev_iov_max, 0, OPT_INT, 512),            // max # iov's to collect into a single readv()/writev() call
+       OPTION(bdev_debug_check_io_overlap, 0, OPT_BOOL, true),  // [DEBUG] check for any pending io overlaps
+       OPTION(bdev_fake_mb, 0, OPT_INT, 0),
+       OPTION(bdev_fake_max_mb, 0, OPT_INT, 0),
+};
+
+const int num_config_options = sizeof(config_optionsp) / sizeof(config_option);
+
+bool conf_set_conf_val(void *field, opt_type_t type, const char *val)
+{
+  switch (type) {
+  case OPT_BOOL:
+    if (strcasecmp(val, "false") == 0)
+      *(bool *)field = false;
+    else if (strcasecmp(val, "true") == 0)
+      *(bool *)field = true;
+    else
+      *(bool *)field = (bool)atoi(val);
+    break;
+  case OPT_INT:
+    *(int *)field = atoi(val);
+    break;
+  case OPT_LONGLONG:
+    *(long long *)field = atoll(val);
+    break;
+  case OPT_STR:
+    if (val)
+      *(char **)field = strdup(val);
+    else
+      *(char **)field = NULL;
+    break;
+  case OPT_FLOAT:
+    *(float *)field = atof(val);
+    break;
+  case OPT_DOUBLE:
+    *(double *)field = strtod(val, NULL);
+    break;
+  case OPT_ADDR:
+    ((entity_addr_t *)field)->parse(val);
+    break;
+  default:
+    return false;
+  }
+
+  return true;
+}
+
+bool conf_set_conf_val(void *field, opt_type_t type, const char *val, long long intval, double doubleval)
+{
+  switch (type) {
+  case OPT_BOOL:
+    *(bool *)field = intval;
+    break;
+  case OPT_INT:
+    *(int *)field = intval;
+    break;
+  case OPT_LONGLONG:
+    *(long long *)field = intval;
+    break;
+  case OPT_STR:
+    if (val) {
+      *(char **)field = strdup(val);
+    } else {
+      *(char **)field = NULL;
+    }
+    break;
+  case OPT_FLOAT:
+    *(float *)field = doubleval;
+    break;
+  case OPT_DOUBLE:
+    *(double *)field = doubleval;
+    break;
+  case OPT_ADDR:
+    ((entity_addr_t *)field)->parse(val);
+    break;
+  default:
+    return false;
+  }
+
+  return true;
+}
+
+static bool conf_reset_val(void *field, opt_type_t type)
+{
+  switch (type) {
+  case OPT_BOOL:
+    *(bool *)field = 0;
+    break;
+  case OPT_INT:
+    *(int *)field = 0;
+    break;
+  case OPT_LONGLONG:
+    *(long long *)field = 0;
+    break;
+  case OPT_STR:
+      *(char **)field = NULL;
+    break;
+  case OPT_FLOAT:
+    *(float *)field = 0;
+    break;
+  case OPT_DOUBLE:
+    *(double *)field = 0;
+    break;
+  case OPT_ADDR:
+    *(entity_addr_t *)field = entity_addr_t();
+    break;
+  default:
+    return false;
+  }
+
+  return true;
+}
+
+static void set_conf_name(config_option *opt)
+{
+  char *newsection = (char *)opt->section;
+  char *newconf = (char *)opt->name;
+  int i;
+
+  if (opt->section[0] == 0) {
+    newsection = strdup("global");
+  }
+
+  if (strncmp(newsection, opt->name, strlen(newsection)) == 0) {
+    /* if key starts with the name of the section, remove name of the section
+       unless key equals to it */
+
+    if (strcmp(newsection, opt->name) == 0)
+      goto done;
+
+    newconf = strdup(&opt->name[strlen(newsection)+1]);
+  } else {
+    newconf = strdup(opt->name);
+  }
+
+  i = 0;
+  while (newconf[i]) {
+    if (newconf[i] == '_')
+      newconf[i] = ' ';
+
+    ++i;
+  }
+
+  done:
+    opt->section = newsection;
+    opt->conf_name = (const char *)newconf;
+}
+
+static int def_conf_to_str(config_option *opt, char *buf, int len)
+{
+  int ret = 0;
+
+  switch (opt->type) {
+  case OPT_INT:
+  case OPT_BOOL:
+    ret = snprintf(buf, len, "%d", (int)opt->def_longlong);
+    break;
+  case OPT_LONGLONG:
+    ret = snprintf(buf, len, "%lld", opt->def_longlong);
+    break;
+  case OPT_STR:
+  case OPT_ADDR:
+    ret = snprintf(buf, len, "%s", opt->def_str);
+    break;
+  case OPT_FLOAT:
+  case OPT_DOUBLE:
+    ret = snprintf(buf, len, "%f", opt->def_double);
+    break;
+  default:
+    break;
+  }
+  return ret;
+}
+
+int ceph_def_conf_by_name(const char *name, char *buf, int buflen)
+{
+  char *newname = strdup(name);
+  int len = strlen(name);
+  config_option *opt;
+  int ret = 0;
+  int i;
+
+  for (i = 0; i < len; i++) {
+    if (newname[i] == ' ')
+      newname[i] = '_';
+  }
+
+  len = sizeof(config_optionsp)/sizeof(config_option);
+
+  for (i = 0; i < len; i++) {
+    opt = &config_optionsp[i];
+    if (strcmp(opt->name, newname) == 0) {
+      ret = def_conf_to_str(opt, buf, buflen);
+      break;
+    }
+  }
+  free(newname);
+  return ret;
+}
+
+static bool cmd_is_char(const char *cmd)
+{
+       return ((cmd[0] == '-') &&
+               cmd[1] && !cmd[2]);
+}
+
+bool conf_cmd_equals(const char *cmd, const char *opt, char char_opt, unsigned int *val_pos)
+{
+       unsigned int i;
+       unsigned int len = strlen(opt);
+
+       *val_pos = 0;
+
+       if (!*cmd)
+               return false;
+
+       if (char_opt && cmd_is_char(cmd))
+               return (char_opt == cmd[1]);
+
+       if ((cmd[0] != '-') || (cmd[1] != '-'))
+               return false;
+
+       for (i=0; i<len; i++) {
+               if ((opt[i] == '_') || (opt[i] == '-')) {
+                       switch (cmd[i+2]) {
+                       case '-':
+                       case '_':
+                               continue;
+                       default:
+                               break;
+                       }
+               }
+
+               if (cmd[i+2] != opt[i])
+                       return false;
+       }
+
+       if (cmd[i+2] == '=')
+               *val_pos = i+3;
+       else if (cmd[i+2])
+               return false;
+
+       return true;
+}
+
+static bool get_var(const char *str, int pos, char *var_name, int len, int *new_pos)
+{
+  int bracket = (str[pos] == '{');
+  int out_pos = 0;
+
+  if (bracket) {
+    pos++;
+  }
+
+  while (str[pos] &&
+       ((bracket && str[pos] != '}') ||
+        isalnum(str[pos]) ||
+         str[pos] == '_')) {
+       var_name[out_pos] = str[pos];
+
+       out_pos ++;
+       if (out_pos == len)
+               return false;
+       pos++;
+  }
+
+  var_name[out_pos] = '\0';
+
+
+  if (bracket && (str[pos] == '}'))
+       pos++;
+
+  *new_pos = pos;
+
+  return true;
+}
+
+static const char *var_val(char *var_name)
+{
+       const char *val;
+
+       if (strcmp(var_name, "type")==0)
+               return g_conf.type;
+       if (strcmp(var_name, "id")==0)
+               return g_conf.id;
+       if (strcmp(var_name, "num")==0)
+               return g_conf.id;
+       if (strcmp(var_name, "name")==0)
+               return g_conf.name;
+       if (strcmp(var_name, "host")==0)
+               return g_conf.host;
+
+       val = getenv(var_name);
+       if (!val)
+               val = "";
+
+       return val;
+}
+
+#define MAX_LINE 256
+#define MAX_VAR_LEN 32
+
+char *conf_post_process_val(const char *val)
+{
+  char var_name[MAX_VAR_LEN];
+  char *buf;
+  int i=0;
+  size_t out_pos = 0;
+  size_t max_line = MAX_LINE;
+
+  buf = (char *)malloc(max_line);
+  *buf = 0;
+
+  while (val[i]) {
+    if (val[i] == '$') {
+       if (get_var(val, i+1, var_name, MAX_VAR_LEN, &i)) {
+               out_pos = dyn_snprintf(&buf, &max_line, 2, "%s%s", buf, var_val(var_name));
+       } else {
+         ++i;
+       }
+    } else {
+       if (out_pos == max_line - 1) {
+               max_line *= 2;
+               buf = (char *)realloc(buf, max_line);
+       }
+       buf[out_pos] = val[i];
+       buf[out_pos + 1] = '\0';
+       ++out_pos;
+       ++i;
+    }
+  }
+
+  buf[out_pos] = '\0';
+
+  return buf;
+}
+
+#define OPT_READ_TYPE(ret, section, var, type, out, def) \
+do { \
+  if (def) \
+    ret = g_conf.cf->read(section, var, (type *)out, *(type *)def); \
+  else \
+    ret = g_conf.cf->read(section, var, (type *)out, 0); \
+} while (0)
+
+int conf_read_key_ext(const char *conf_name, const char *conf_alt_name, const char *conf_type,
+                     const char *alt_section, const char *key, opt_type_t type, void *out, void *def,
+                     bool free_old_val)
+{
+  int s;
+  int ret;
+  char *tmp = 0;
+  for (s=0; s<5; s++) {
+    const char *section;
+
+    switch (s) {
+      case 0:
+          section = conf_name;
+          if (section)
+            break;
+      case 1:
+          section = conf_alt_name;
+          if (section)
+            break;
+      case 2:
+           s = 2;
+            section = conf_type;
+            if (section)
+              break;
+      case 3:
+           s = 3;
+            section = alt_section;
+           if (section)
+             break;
+      default:
+           s = 4;
+           section = "global";
+    }
+
+    switch (type) {
+    case OPT_STR:
+      if (free_old_val)
+        tmp = *(char **)out;
+      OPT_READ_TYPE(ret, section, key, char *, out, def);
+      if (free_old_val &&
+          *(char **)out != tmp)
+          free(tmp);
+      break;
+    case OPT_BOOL:
+      OPT_READ_TYPE(ret, section, key, bool, out, def);
+      break;
+    case OPT_LONGLONG:
+      OPT_READ_TYPE(ret, section, key, long long, out, def);
+      break;
+    case OPT_INT:
+      OPT_READ_TYPE(ret, section, key, int, out, def);
+      break;
+    case OPT_FLOAT:
+      OPT_READ_TYPE(ret, section, key, float, out, def);
+      break;
+    case OPT_DOUBLE:
+      OPT_READ_TYPE(ret, section, key, double, out, def);
+      break;
+    case OPT_ADDR:
+      ret = g_conf.cf->read(section, key, &tmp, (char *)def);
+      if (*tmp == *((char *)def)) {
+          ret = 0;
+      }
+      else {
+        ret = 1;
+      }
+      if ((1 == ret) &&!(((entity_addr_t*)out)->parse(tmp))) {
+        cerr << "Addr " << tmp << " failed to parse! Shutting down" << std::endl;
+        exit(1);
+      }
+      break;
+    case OPT_U32:
+      OPT_READ_TYPE(ret, section, key, uint32_t, out, def);
+      break;
+    default:
+       ret = 0;
+        break;
+    }
+
+    if (ret)
+       break;
+  }
+
+  return ret;
+}
+
+int conf_read_key(const char *alt_section, const char *key, opt_type_t type, void *out, void *def, bool free_old_val)
+{
+       return conf_read_key_ext(g_conf.name, g_conf.alt_name, g_conf.type,
+                                alt_section, key, type, out, def, free_old_val);
+}
+
+bool parse_config_file(ConfFile *cf, bool auto_update)
+{
+  int opt_len = sizeof(config_optionsp)/sizeof(config_option);
+
+  cf->set_post_process_func(conf_post_process_val);
+  if (!cf->parse())
+       return false;
+
+  for (int i=0; i<opt_len; i++) {
+      config_option *opt = &config_optionsp[i];
+      conf_read_key(NULL, opt->conf_name, opt->type, opt->val_ptr, opt->val_ptr, true);
+  }
+  conf_read_key(NULL, "lockdep", OPT_INT, &g_lockdep, &g_lockdep, false);
+
+  return true;
+}
+
+bool is_bool_param(const char *param)
+{
+       return ((strcasecmp(param, "true")==0) || (strcasecmp(param, "false")==0));
+}
+
+bool ceph_resolve_file_search(std::string& filename_list, std::string& result)
+{
+  list<string> ls;
+  get_str_list(filename_list, ls);
+
+  list<string>::iterator iter;
+  for (iter = ls.begin(); iter != ls.end(); ++iter) {
+    int fd = ::open(iter->c_str(), O_RDONLY);
+    if (fd < 0)
+      continue;
+
+    close(fd);
+    result = *iter;
+    return true;
+  }
+
+  return false;
+}
+
+md_config_t::md_config_t()
+  : cf(NULL)
+{
+       //
+       // Note: because our md_config_t structure is a global, the memory used to
+       // store it will start out zeroed. So there is no need to manually initialize
+       // everything to 0 here.
+       //
+       // However, it's good practice to add your new config option to config_optionsp
+       // so that its default value is explicit rather than implicit.
+       //
+
+  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->val_ptr) {
+      conf_reset_val(opt->val_ptr, opt->type);
+    }
+    if (!conf_set_conf_val(opt->val_ptr,
+                          opt->type,
+                          opt->def_str,
+                          opt->def_longlong,
+                          opt->def_double)) {
+                       std::ostringstream oss;
+                       oss << "error initializing g_conf value num " << i;
+                       assert(oss.str().c_str() == 0);
+    }
+
+    set_conf_name(opt);
+  }
+
+  g_conf.id = strdup("admin");
+}
+
+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;
+}
+
diff --git a/src/common/config.h b/src/common/config.h
new file mode 100644 (file)
index 0000000..e005d31
--- /dev/null
@@ -0,0 +1,537 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
+ *
+ * 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 
+ * Foundation.  See file COPYING.
+ * 
+ */
+
+#ifndef CEPH_CONFIG_H
+#define CEPH_CONFIG_H
+
+extern struct ceph_file_layout g_default_file_layout;
+
+#include <vector>
+#include <map>
+
+#include "include/assert.h"
+
+#include "common/Mutex.h"
+
+#define OSD_REP_PRIMARY 0
+#define OSD_REP_SPLAY   1
+#define OSD_REP_CHAIN   2
+
+
+#include "msg/msg_types.h"
+
+#ifdef HAVE_LIBTCMALLOC
+#include <google/heap-profiler.h>
+#endif //HAVE_LIBTCMALLOC
+
+struct EntityName;
+
+enum log_to_stderr_t {
+  LOG_TO_STDERR_NONE = 0,
+  LOG_TO_STDERR_SOME = 1,
+  LOG_TO_STDERR_ALL = 2,
+};
+
+struct ConfFile;
+
+struct md_config_t {
+  md_config_t();
+  ~md_config_t();
+
+  ConfFile *cf;
+
+  char *type;
+  char *id;
+  char *name;
+  char *alt_name;
+  char *host;
+
+  int num_client;
+
+  //bool mkfs;
+  
+  const char *monmap;
+  const char *mon_host;
+  bool daemonize;
+
+  //profiling
+  bool tcmalloc_have;
+  bool tcmalloc_profiler_run;
+  void (*profiler_start)(const char*);
+  bool (*profiler_running)();
+  void (*profiler_stop)();
+  void (*profiler_dump)(const char*);
+  int profiler_allocation_interval;
+  int profiler_highwater_interval;
+
+  // profiling logger
+  bool profiling_logger;
+  int profiling_logger_interval;
+  bool profiling_logger_calc_variance;
+  const char *profiling_logger_subdir;
+  const char *profiling_logger_dir;
+
+  const char *log_file;
+  const char *log_dir;
+  const char *log_sym_dir;
+  int log_sym_history;
+
+  int log_to_stderr;
+
+  bool log_to_syslog;
+  bool log_per_instance;
+  bool log_to_file;
+
+  bool clog_to_monitors;
+  bool clog_to_syslog;
+
+  const char *pid_file;
+
+  char *conf;
+
+  const char *chdir;
+
+  int kill_after;
+
+  long long max_open_files;
+
+  int debug;
+  int debug_lockdep;
+  int debug_mds;
+  int debug_mds_balancer;
+  int debug_mds_log;
+  int debug_mds_log_expire;
+  int debug_mds_migrator;
+  int debug_buffer;
+  int debug_timer;
+  int debug_filer;
+  int debug_objecter;
+  int debug_rados;
+  int debug_rbd;
+  int debug_journaler;
+  int debug_objectcacher;
+  int debug_client;
+  int debug_osd;
+  int debug_ebofs;
+  int debug_filestore;
+  int debug_journal;
+  int debug_bdev;
+  int debug_ms;
+  int debug_mon;
+  int debug_monc;
+  int debug_paxos;
+  int debug_tp;
+  int debug_auth;
+  int debug_finisher;
+
+  // auth
+  char *key;
+  char *keyfile;
+  char *keyring;
+
+  // messenger
+
+  /*bool tcp_skip_rank0;
+  bool tcp_overlay_clients;
+  bool tcp_log;
+  bool tcp_serial_marshall;
+  bool tcp_serial_out;
+  bool tcp_multi_out;
+  bool tcp_multi_dispatch;
+  */
+  entity_addr_t public_addr;
+  entity_addr_t cluster_addr;
+
+  bool ms_tcp_nodelay;
+  double ms_initial_backoff;
+  double ms_max_backoff;
+  bool ms_nocrc;
+  bool ms_die_on_bad_msg;
+  uint64_t ms_dispatch_throttle_bytes;
+  bool ms_bind_ipv6;
+  uint64_t ms_rwthread_stack_bytes;
+  uint64_t ms_tcp_read_timeout;
+  uint64_t ms_inject_socket_failures;
+
+  // mon
+  const char *mon_data;
+  int mon_tick_interval;
+  double mon_subscribe_interval;
+  int mon_osd_down_out_interval;
+  float mon_lease;
+  float mon_lease_renew_interval;
+  float mon_clock_drift_allowed;
+  float mon_clock_drift_warn_backoff;
+  float mon_lease_ack_timeout;
+  float mon_accept_timeout;
+  float mon_pg_create_interval;
+  int mon_osd_full_ratio;
+  int mon_osd_nearfull_ratio;
+  int mon_globalid_prealloc;
+  int mon_osd_report_timeout;
+
+  double paxos_propose_interval;
+  double paxos_min_wait;
+  double paxos_observer_timeout;
+
+  // auth
+  char *auth_supported;
+  double auth_mon_ticket_ttl;
+  double auth_service_ticket_ttl;
+  EntityName *entity_name;
+
+  double mon_client_hunt_interval;
+  double mon_client_ping_interval;
+
+  // client
+  int      client_cache_size;
+  float    client_cache_mid;
+  int      client_cache_stat_ttl;
+  int      client_cache_readdir_ttl;
+  bool     client_use_random_mds;          // debug flag
+  double   client_mount_timeout;
+  double   client_unmount_timeout;
+  double   client_tick_interval;
+  const char *client_trace;
+  long long client_readahead_min;
+  long long client_readahead_max_bytes;
+  long long client_readahead_max_periods;
+  const char *client_snapdir;
+  const char *client_mountpoint;
+
+  // objectcacher
+  bool     client_oc;
+  int      client_oc_size;
+  int      client_oc_max_dirty;
+  int      client_oc_target_dirty;
+  long long unsigned   client_oc_max_sync_write;
+
+  int      client_notify_timeout;
+
+  // objecter
+  double objecter_mon_retry_interval;
+  double objecter_tick_interval;
+  double objecter_timeout;
+  uint64_t objecter_inflight_op_bytes;
+
+  // journaler
+  bool  journaler_allow_split_entries;
+  bool  journaler_safe;
+  int   journaler_write_head_interval;
+  bool  journaler_cache;
+  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;
+  float mds_cache_mid;
+  int   mds_mem_max;
+  float mds_dir_commit_ratio;
+  int   mds_dir_max_commit_size;
+  
+  float mds_decay_halflife;
+
+  float mds_beacon_interval;
+  float mds_beacon_grace;
+  float mds_blacklist_interval;
+
+  float mds_session_timeout;
+  float mds_session_autoclose;
+  float mds_reconnect_timeout;
+
+  float mds_tick_interval;
+  float mds_dirstat_min_interval;
+  float mds_scatter_nudge_interval;
+
+  int mds_client_prealloc_inos;
+  bool mds_early_reply;
+
+  bool mds_use_tmap;
+
+  int mds_default_dir_hash;
+
+  bool mds_log;
+  bool mds_log_unsafe;
+  bool mds_log_skip_corrupt_events;
+  int mds_log_max_events;
+  int mds_log_max_segments;
+  int mds_log_max_expiring;
+  int mds_log_eopen_size;
+  
+  float mds_bal_sample_interval;  
+  float mds_bal_replicate_threshold;
+  float mds_bal_unreplicate_threshold;
+  bool mds_bal_frag;
+  int mds_bal_split_size;
+  float mds_bal_split_rd;
+  float mds_bal_split_wr;
+  int mds_bal_split_bits;
+  int mds_bal_merge_size;
+  float mds_bal_merge_rd;
+  float mds_bal_merge_wr;
+  int   mds_bal_interval;
+  int   mds_bal_fragment_interval;
+  float mds_bal_idle_threshold;
+  int   mds_bal_max;
+  int   mds_bal_max_until;
+
+  int   mds_bal_mode;
+  float mds_bal_min_rebalance;
+  float mds_bal_min_start;
+  float mds_bal_need_min;
+  float mds_bal_need_max;
+  float mds_bal_midchunk;
+  float mds_bal_minchunk;
+
+  int mds_bal_target_removal_min;
+  int mds_bal_target_removal_max;
+
+  float mds_replay_interval;
+
+  int   mds_shutdown_check;
+
+  int mds_thrash_exports;
+  int mds_thrash_fragments;
+  bool mds_dump_cache_on_map;
+  bool mds_dump_cache_after_rejoin;
+
+  // set these to non-zero to specify kill points
+  bool mds_verify_scatter;
+  bool mds_debug_scatterstat;
+  bool mds_debug_frag;
+  int mds_kill_mdstable_at;
+  int mds_kill_export_at;
+  int mds_kill_import_at;
+  int mds_kill_rename_at;
+
+  bool mds_wipe_sessions;
+  bool mds_wipe_ino_prealloc;
+  int mds_skip_ino;
+  int max_mds;
+
+  int mds_standby_for_rank;
+  char* mds_standby_for_name;
+  bool mds_standby_replay;
+
+  // osd
+  const char *osd_data;
+  const char *osd_journal;
+  int osd_journal_size;  // in mb
+  int osd_max_write_size; // in MB
+  bool osd_balance_reads;
+  int osd_flash_crowd_iat_threshold;  // flash crowd interarrival time threshold in ms
+  double osd_flash_crowd_iat_alpha;
+
+  int  osd_shed_reads;
+  double osd_shed_reads_min_latency;
+  double osd_shed_reads_min_latency_diff;
+  double osd_shed_reads_min_latency_ratio;
+
+  uint64_t osd_client_message_size_cap;
+
+  double osd_stat_refresh_interval;
+
+  int   osd_pg_bits;
+  int   osd_pgp_bits;
+  int   osd_lpg_bits;
+  int   osd_pg_layout;
+  int   osd_min_rep;
+  int   osd_max_rep;
+  int   osd_min_raid_width;
+  int   osd_max_raid_width;
+
+  int osd_pool_default_crush_rule;
+  int osd_pool_default_size;
+  int osd_pool_default_pg_num;
+  int osd_pool_default_pgp_num;
+
+  int   osd_op_threads;
+  int   osd_max_opq;
+  int   osd_disk_threads;
+  int   osd_recovery_threads;
+
+  float   osd_age;
+  int   osd_age_time;
+  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;
+  int   osd_min_down_reporters;
+  int   osd_min_down_reports;
+  int   osd_replay_window;
+  bool  osd_preserve_trimmed_log;
+
+  float osd_recovery_delay_start;
+  int osd_recovery_max_active;
+  uint64_t osd_recovery_max_chunk;
+
+  bool osd_recovery_forget_lost_objects;
+
+  bool osd_auto_weight;
+
+  double osd_class_error_timeout;
+  double osd_class_timeout;
+  const char *osd_class_tmp;
+
+  int osd_max_scrubs;
+  float osd_scrub_load_threshold;
+  float osd_scrub_min_interval;
+  float osd_scrub_max_interval;
+
+  bool osd_check_for_log_corruption;  // bleh
+
+  bool osd_use_stale_snap;
+
+  uint32_t osd_max_notify_timeout;
+
+  // filestore
+  bool filestore;
+  double   filestore_max_sync_interval;
+  double   filestore_min_sync_interval;
+  bool  filestore_fake_attrs;
+  bool  filestore_fake_collections;
+  const char  *filestore_dev;
+  bool filestore_btrfs_trans;
+  bool filestore_btrfs_snap;
+  bool filestore_btrfs_clone_range;
+  bool filestore_fsync_flushes_journal_data;
+  bool filestore_flusher;
+  int filestore_flusher_max_fds;
+  bool filestore_sync_flush;
+  bool filestore_journal_parallel;
+  bool filestore_journal_writeahead;
+  bool filestore_journal_trailing;
+  int filestore_queue_max_ops;
+  int filestore_queue_max_bytes;
+  int filestore_op_threads;
+  float filestore_commit_timeout;
+  
+  // ebofs
+  bool  ebofs;
+  bool  ebofs_cloneable;
+  bool  ebofs_verify;
+  int   ebofs_commit_ms;
+  int   ebofs_oc_size;
+  int   ebofs_cc_size;
+  unsigned long long ebofs_bc_size;
+  unsigned long long ebofs_bc_max_dirty;
+  unsigned ebofs_max_prefetch;
+  bool  ebofs_realloc;
+  bool ebofs_verify_csum_on_read;
+  
+  // journal
+  bool journal_dio;
+  bool journal_block_align;
+  int journal_max_write_bytes;
+  int journal_max_write_entries;
+  int journal_queue_max_ops;
+  int journal_queue_max_bytes;
+  int journal_align_min_size;
+
+  // block device
+  bool  bdev_lock;
+  int   bdev_iothreads;
+  int   bdev_idle_kick_after_ms;
+  int   bdev_el_fw_max_ms;  
+  int   bdev_el_bw_max_ms;
+  bool  bdev_el_bidir;
+  int   bdev_iov_max;
+  bool  bdev_debug_check_io_overlap;
+  int   bdev_fake_mb;
+  int   bdev_fake_max_mb;
+
+#ifdef USE_OSBDB
+  bool bdbstore;
+  int debug_bdbstore;
+  bool bdbstore_btree;
+  int bdbstore_ffactor;
+  int bdbstore_nelem;
+  int bdbstore_pagesize;
+  int bdbstore_cachesize;
+  bool bdbstore_transactional;
+#endif // USE_OSBDB
+};
+
+extern md_config_t g_conf;     
+
+typedef enum {
+       OPT_NONE, OPT_INT, OPT_LONGLONG, OPT_STR, OPT_DOUBLE, OPT_FLOAT, OPT_BOOL,
+       OPT_ADDR, OPT_U32
+} opt_type_t;
+
+char *conf_post_process_val(const char *val);
+int conf_read_key(const char *alt_section, const char *key, opt_type_t type, void *out, void *def, bool free_old_val = false);
+bool conf_set_conf_val(void *field, opt_type_t type, const char *val);
+bool conf_cmd_equals(const char *cmd, const char *opt, char char_opt, unsigned int *val_pos);
+int ceph_def_conf_by_name(const char *name, char *buf, int len);
+
+bool ceph_resolve_file_search(string& filename_list, string& result);
+
+#define CONF_NEXT_VAL (val_pos ? &args[i][val_pos] : args[++i])
+
+#define CONF_SET_ARG_VAL(dest, type) \
+       conf_set_conf_val(dest, type, CONF_NEXT_VAL)
+
+#define CONF_VAL args[i]
+
+#define CONF_SAFE_SET_ARG_VAL_USAGE(dest, type, show_usage) \
+       do { \
+          __isarg = i+1 < args.size(); \
+          if (__isarg && !val_pos && \
+              args[i+1][0] == '-' && args[i+1][1] != '\0') \
+              __isarg = false; \
+          if (type == OPT_BOOL) { \
+               if (val_pos) { \
+                       CONF_SET_ARG_VAL(dest, type); \
+               } else \
+                       conf_set_conf_val(dest, type, "true"); \
+          } else if (__isarg || val_pos) { \
+               CONF_SET_ARG_VAL(dest, type); \
+         } else if (show_usage && args_usage) \
+               args_usage(); \
+       } while (0)
+
+#define CONF_SAFE_SET_ARG_VAL(dest, type) CONF_SAFE_SET_ARG_VAL_USAGE(dest, type, true)
+
+#define CONF_SET_BOOL_ARG_VAL(dest) \
+       conf_set_conf_val(dest, OPT_BOOL, (val_pos ? &args[i][val_pos] : "true"))
+
+#define CONF_ARG_EQ(str_cmd, char_cmd) \
+       conf_cmd_equals(args[i], str_cmd, char_cmd, &val_pos)
+
+struct config_option {
+  const char *section;
+  const char *conf_name;
+  const char *name;
+  void *val_ptr;
+
+  const char *def_str;
+  long long def_longlong;
+  double def_double;
+
+  opt_type_t type;
+  char char_option;  // if any
+};
+
+extern struct config_option config_optionsp[];
+extern const int num_config_options;
+
+extern bool parse_config_file(ConfFile *cf, bool auto_update);
+
+#include "common/debug.h"
+
+#endif
index 12a51717108b7fb6608c08e79451edc8f27547c2..ac083da64b17437b0b6bb0011f7404ffa6bf3b8f 100644 (file)
@@ -1,5 +1,5 @@
 #include "common/DoutStreambuf.h"
-#include "config.h"
+#include "common/config.h"
 #include "debug.h"
 
 #include <iostream>
index 0e01534d458defcc63a873f6f65b058970bc77b7..057f130d483dfa83a2e20e9db70465ed4192365a 100644 (file)
@@ -17,7 +17,7 @@
 #define CEPH_DEBUG_H
 
 #include "common/likely.h"
-#include "config.h"                // need for g_conf
+#include "common/config.h"                 // need for g_conf
 #include "include/assert.h"
 
 #include <iostream>
index 7d37e6059832a0aa6dc0addb14877e6eb62ae100..0b49ab2776f65ace85f1862fe5cee94d90ee90e5 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <ext/hash_map>
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS lockdep
 
index 38e0b5bce24206d3041e9d79865406f667607e2d..72b5eb1d0a73644ee5b9052b667276e6692ef13d 100644 (file)
@@ -12,7 +12,7 @@
  *
  */
 
-#include "config.h"
+#include "common/config.h"
 #include "common/debug.h"
 #include "common/errno.h"
 
index e79dc590f995822f9ca63917ac86fff925a16350..e8ebdd5834113d4ae7e4d5e3643de68428075518 100644 (file)
@@ -16,7 +16,7 @@
 #include "common/ProfLogger.h"
 #include "common/debug.h"
 #include "common/signal.h"
-#include "config.h"
+#include "common/config.h"
 
 #include <signal.h>
 #include <sstream>
index 8d0c5d524d8ec107105c3d77e10d0c85806efcb2..4a727bed1020cd056b49f6a035045760f5c6a6d9 100644 (file)
@@ -12,7 +12,7 @@
  *
  */
 
-#include "config.h"
+#include "common/config.h"
 #include "ceph_ver.h"
 #include "common/debug.h"
 #include "common/version.h"
diff --git a/src/config.cc b/src/config.cc
deleted file mode 100644 (file)
index a2be792..0000000
+++ /dev/null
@@ -1,911 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
- *
- * 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
- * Foundation.  See file COPYING.
- *
- */
-
-#include "auth/Auth.h"
-#include "common/BackTrace.h"
-#include "common/Clock.h"
-#include "common/ConfUtils.h"
-#include "common/ProfLogger.h"
-#include "common/common_init.h"
-#include "common/dyn_snprintf.h"
-#include "common/version.h"
-#include "config.h"
-#include "include/atomic.h"
-#include "include/str_list.h"
-#include "include/types.h"
-#include "msg/msg_types.h"
-#include "osd/osd_types.h"
-
-#include <fcntl.h>
-#include <fstream>
-#include <stdlib.h>
-#include <string.h>
-#include <syslog.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-/* Don't use standard Ceph logging in this file.
- * We can't use logging until it's initialized, and a lot of the necessary
- * initialization happens here.
- */
-#undef dout
-#undef pdout
-#undef derr
-#undef generic_dout
-#undef dendl
-
-/* The Ceph configuration. */
-md_config_t g_conf __attribute__((init_priority(103)));
-
-#define _STR(x) #x
-#define STRINGIFY(x) _STR(x)
-
-
-#define OPTION_OPT_STR(section, name, schar, type, def_val) \
-       { STRINGIFY(section), NULL, STRINGIFY(name), \
-          &g_conf.name, def_val, 0, 0, type, schar }
-
-#define OPTION_OPT_ADDR(section, name, schar, type, def_val) \
-       { STRINGIFY(section), NULL, STRINGIFY(name), \
-          &g_conf.name, def_val, 0, 0, type, schar }
-
-#define OPTION_OPT_LONGLONG(section, name, schar, type, def_val) \
-       { STRINGIFY(section), NULL, STRINGIFY(name), \
-          &g_conf.name, 0, def_val, 0, type, schar }
-#define OPTION_OPT_INT OPTION_OPT_LONGLONG
-#define OPTION_OPT_BOOL OPTION_OPT_INT
-
-#define OPTION_OPT_DOUBLE(section, name, schar, type, def_val) \
-       { STRINGIFY(section), NULL, STRINGIFY(name), \
-          &g_conf.name, 0, 0, def_val, type, schar }
-#define OPTION_OPT_FLOAT OPTION_OPT_DOUBLE
-
-#define OPTION(name, schar, type, def_val) OPTION_##type("global", name, schar, type, def_val)
-
-#define OPTION_ALT(section, conf_name, name, schar, type, def_val) \
-       { STRINGIFY(section), NULL, STRINGIFY(conf_name), \
-         &g_conf.name, STRINGIFY(def_val), type, schar }
-
-struct config_option config_optionsp[] = {
-       OPTION(host, 0, OPT_STR, "localhost"),
-       OPTION(public_addr, 0, OPT_ADDR, ""),
-       OPTION(cluster_addr, 0, OPT_ADDR, ""),
-       OPTION(num_client, 0, OPT_INT, 1),
-       OPTION(monmap, 'M', OPT_STR, 0),
-       OPTION(mon_host, 'm', OPT_STR, 0),
-       OPTION(daemonize, 'd', OPT_BOOL, false),
-        OPTION(tcmalloc_profiler_run, 0, OPT_BOOL, false),
-        OPTION(profiler_allocation_interval, 0, OPT_INT, 1073741824),
-        OPTION(profiler_highwater_interval, 0, OPT_INT, 104857600),
-       OPTION(profiling_logger, 0, OPT_BOOL, false),
-       OPTION(profiling_logger_interval, 0, OPT_INT, 1),
-       OPTION(profiling_logger_calc_variance, 0, OPT_BOOL, false),
-       OPTION(profiling_logger_subdir, 0, OPT_STR, 0),
-       OPTION(profiling_logger_dir, 0, OPT_STR, "/var/log/ceph/stat"),
-       OPTION(log_file, 0, OPT_STR, 0),
-       OPTION(log_dir, 0, OPT_STR, "/var/log/ceph"),
-       OPTION(log_sym_dir, 0, OPT_STR, 0),
-       OPTION(log_sym_history, 0, OPT_INT, 10),
-       OPTION(log_to_stderr, 0, OPT_INT, LOG_TO_STDERR_SOME),
-       OPTION(log_to_syslog, 0, OPT_BOOL, false),
-       OPTION(log_per_instance, 0, OPT_BOOL, false),
-       OPTION(log_to_file, 0, OPT_BOOL, true),
-       OPTION(clog_to_monitors, 0, OPT_BOOL, true),
-       OPTION(clog_to_syslog, 0, OPT_BOOL, false),
-       OPTION(pid_file, 0, OPT_STR, "/var/run/ceph/$type.$id.pid"),
-       OPTION(conf, 'c', OPT_STR, "/etc/ceph/ceph.conf, ~/.ceph/config, ceph.conf"),
-       OPTION(chdir, 0, OPT_STR, "/"),
-       OPTION(kill_after, 0, OPT_INT, 0),
-       OPTION(max_open_files, 0, OPT_LONGLONG, 0),
-       OPTION(debug, 0, OPT_INT, 0),
-       OPTION(debug_lockdep, 0, OPT_INT, 0),
-       OPTION(debug_mds, 0, OPT_INT, 1),
-       OPTION(debug_mds_balancer, 0, OPT_INT, 1),
-       OPTION(debug_mds_log, 0, OPT_INT, 1),
-       OPTION(debug_mds_log_expire, 0, OPT_INT, 1),
-       OPTION(debug_mds_migrator, 0, OPT_INT, 1),
-       OPTION(debug_buffer, 0, OPT_INT, 0),
-       OPTION(debug_timer, 0, OPT_INT, 0),
-       OPTION(debug_filer, 0, OPT_INT, 0),
-       OPTION(debug_objecter, 0, OPT_INT, 0),
-       OPTION(debug_rados, 0, OPT_INT, 0),
-       OPTION(debug_rbd, 0, OPT_INT, 0),
-       OPTION(debug_journaler, 0, OPT_INT, 0),
-       OPTION(debug_objectcacher, 0, OPT_INT, 0),
-       OPTION(debug_client, 0, OPT_INT, 0),
-       OPTION(debug_osd, 0, OPT_INT, 0),
-       OPTION(debug_ebofs, 0, OPT_INT, 1),
-       OPTION(debug_filestore, 0, OPT_INT, 1),
-       OPTION(debug_journal, 0, OPT_INT, 1),
-       OPTION(debug_bdev, 0, OPT_INT, 1),         // block device
-       OPTION(debug_ms, 0, OPT_INT, 0),
-       OPTION(debug_mon, 0, OPT_INT, 1),
-       OPTION(debug_monc, 0, OPT_INT, 0),
-       OPTION(debug_paxos, 0, OPT_INT, 0),
-       OPTION(debug_tp, 0, OPT_INT, 0),
-       OPTION(debug_auth, 0, OPT_INT, 1),
-       OPTION(debug_finisher, 0, OPT_INT, 1),
-       OPTION(key, 0, OPT_STR, ""),
-       OPTION(keyfile, 'K', OPT_STR, ""),
-       OPTION(keyring, 'k', OPT_STR, "/etc/ceph/keyring,/etc/ceph/keyring.bin"),
-       OPTION(ms_tcp_nodelay, 0, OPT_BOOL, true),
-       OPTION(ms_initial_backoff, 0, OPT_DOUBLE, .2),
-       OPTION(ms_max_backoff, 0, OPT_DOUBLE, 15.0),
-       OPTION(ms_nocrc, 0, OPT_BOOL, false),
-       OPTION(ms_die_on_bad_msg, 0, OPT_BOOL, false),
-       OPTION(ms_dispatch_throttle_bytes, 0, OPT_INT, 100 << 20),
-       OPTION(ms_bind_ipv6, 0, OPT_BOOL, false),
-        OPTION(ms_rwthread_stack_bytes, 0, OPT_INT, 1024 << 10),
-        OPTION(ms_tcp_read_timeout, 0, OPT_LONGLONG, 900),
-       OPTION(ms_inject_socket_failures, 0, OPT_LONGLONG, 0),
-       OPTION(mon_data, 0, OPT_STR, ""),
-       OPTION(mon_tick_interval, 0, OPT_INT, 5),
-       OPTION(mon_subscribe_interval, 0, OPT_DOUBLE, 300),
-       OPTION(mon_osd_down_out_interval, 0, OPT_INT, 300), // seconds
-       OPTION(mon_lease, 0, OPT_FLOAT, 5),                 // lease interval
-       OPTION(mon_lease_renew_interval, 0, OPT_FLOAT, 3), // on leader, to renew the lease
-       OPTION(mon_lease_ack_timeout, 0, OPT_FLOAT, 10.0), // on leader, if lease isn't acked by all peons
-       OPTION(mon_clock_drift_allowed, 0, OPT_FLOAT, .010), // allowed clock drift between monitors
-       OPTION(mon_clock_drift_warn_backoff, 0, OPT_FLOAT, 5), // exponential backoff for clock drift warnings
-       OPTION(mon_accept_timeout, 0, OPT_FLOAT, 10.0),    // on leader, if paxos update isn't accepted
-       OPTION(mon_pg_create_interval, 0, OPT_FLOAT, 30.0), // no more than every 30s
-       OPTION(mon_osd_full_ratio, 0, OPT_INT, 95), // what % full makes an OSD "full"
-       OPTION(mon_osd_nearfull_ratio, 0, OPT_INT, 85), // what % full makes an OSD near full
-       OPTION(mon_globalid_prealloc, 0, OPT_INT, 100),   // how many globalids to prealloc
-       OPTION(mon_osd_report_timeout, 0, OPT_INT, 900),    // grace period before declaring unresponsive OSDs dead
-       OPTION(paxos_propose_interval, 0, OPT_DOUBLE, 1.0),  // gather updates for this long before proposing a map update
-       OPTION(paxos_min_wait, 0, OPT_DOUBLE, 0.05),  // min time to gather updates for after period of inactivity
-       OPTION(paxos_observer_timeout, 0, OPT_DOUBLE, 5*60), // gather updates for this long before proposing a map update
-       OPTION(auth_supported, 0, OPT_STR, "none"),
-       OPTION(auth_mon_ticket_ttl, 0, OPT_DOUBLE, 60*60*12),
-       OPTION(auth_service_ticket_ttl, 0, OPT_DOUBLE, 60*60),
-       OPTION(mon_client_hunt_interval, 0, OPT_DOUBLE, 3.0),   // try new mon every N seconds until we connect
-       OPTION(mon_client_ping_interval, 0, OPT_DOUBLE, 10.0),  // ping every N seconds
-       OPTION(client_cache_size, 0, OPT_INT, 16384),
-       OPTION(client_cache_mid, 0, OPT_FLOAT, .75),
-       OPTION(client_cache_stat_ttl, 0, OPT_INT, 0), // seconds until cached stat results become invalid
-       OPTION(client_cache_readdir_ttl, 0, OPT_INT, 1),  // 1 second only
-       OPTION(client_use_random_mds, 0, OPT_BOOL, false),
-       OPTION(client_mount_timeout, 0, OPT_DOUBLE, 30.0),
-       OPTION(client_unmount_timeout, 0, OPT_DOUBLE, 10.0),
-       OPTION(client_tick_interval, 0, OPT_DOUBLE, 1.0),
-       OPTION(client_trace, 0, OPT_STR, 0),
-       OPTION(client_readahead_min, 0, OPT_LONGLONG, 128*1024),  // readahead at _least_ this much.
-       OPTION(client_readahead_max_bytes, 0, OPT_LONGLONG, 0),  //8 * 1024*1024,
-       OPTION(client_readahead_max_periods, 0, OPT_LONGLONG, 4),  // as multiple of file layout period (object size * num stripes)
-       OPTION(client_snapdir, 0, OPT_STR, ".snap"),
-       OPTION(client_mountpoint, 'r', OPT_STR, "/"),
-       OPTION(client_notify_timeout, 0, OPT_INT, 10), // in seconds
-       OPTION(client_oc, 0, OPT_BOOL, true),
-       OPTION(client_oc_size, 0, OPT_INT, 1024*1024* 200),    // MB * n
-       OPTION(client_oc_max_dirty, 0, OPT_INT, 1024*1024* 100),    // MB * n  (dirty OR tx.. bigish)
-       OPTION(client_oc_target_dirty, 0, OPT_INT, 1024*1024* 8), // target dirty (keep this smallish)
-       // note: the max amount of "in flight" dirty data is roughly (max - target)
-       OPTION(client_oc_max_sync_write, 0, OPT_LONGLONG, 128*1024),   // sync writes >= this use wrlock
-       OPTION(objecter_tick_interval, 0, OPT_DOUBLE, 5.0),
-       OPTION(objecter_mon_retry_interval, 0, OPT_DOUBLE, 5.0),
-       OPTION(objecter_timeout, 0, OPT_DOUBLE, 10.0),    // before we ask for a map
-       OPTION(objecter_inflight_op_bytes, 0, OPT_LONGLONG, 1024*1024*100), //max in-flight data (both directions)
-       OPTION(journaler_allow_split_entries, 0, OPT_BOOL, true),
-       OPTION(journaler_safe, 0, OPT_BOOL, true),  // wait for COMMIT on journal writes
-       OPTION(journaler_write_head_interval, 0, OPT_INT, 15),
-       OPTION(journaler_cache, 0, OPT_BOOL, false), // cache writes for later readback
-       OPTION(journaler_prefetch_periods, 0, OPT_INT, 50),   // * journal object size (1~MB? see above)
-       OPTION(journaler_batch_interval, 0, OPT_DOUBLE, .001),   // seconds.. max add'l latency we artificially incur
-       OPTION(journaler_batch_max, 0, OPT_LONGLONG, 0),  // max bytes we'll delay flushing; disable, for now....
-       OPTION(mds_max_file_size, 0, OPT_LONGLONG, 1ULL << 40),
-       OPTION(mds_cache_size, 0, OPT_INT, 100000),
-       OPTION(mds_cache_mid, 0, OPT_FLOAT, .7),
-       OPTION(mds_mem_max, 0, OPT_INT, 1048576),        // KB
-       OPTION(mds_dir_commit_ratio, 0, OPT_FLOAT, .5),
-       OPTION(mds_dir_max_commit_size, 0, OPT_INT, 90), // MB
-       OPTION(mds_decay_halflife, 0, OPT_FLOAT, 5),
-       OPTION(mds_beacon_interval, 0, OPT_FLOAT, 4),
-       OPTION(mds_beacon_grace, 0, OPT_FLOAT, 15),
-       OPTION(mds_blacklist_interval, 0, OPT_FLOAT, 24.0*60.0),  // how long to blacklist failed nodes
-       OPTION(mds_session_timeout, 0, OPT_FLOAT, 60),    // cap bits and leases time out if client idle
-       OPTION(mds_session_autoclose, 0, OPT_FLOAT, 300), // autoclose idle session
-       OPTION(mds_reconnect_timeout, 0, OPT_FLOAT, 45),  // seconds to wait for clients during mds restart
-                                                         //  make it (mds_session_timeout - mds_beacon_grace)
-       OPTION(mds_tick_interval, 0, OPT_FLOAT, 5),
-       OPTION(mds_dirstat_min_interval, 0, OPT_FLOAT, 1),    // try to avoid propagating more often than this
-       OPTION(mds_scatter_nudge_interval, 0, OPT_FLOAT, 5),  // how quickly dirstat changes propagate up the hierarchy
-       OPTION(mds_client_prealloc_inos, 0, OPT_INT, 1000),
-       OPTION(mds_early_reply, 0, OPT_BOOL, true),
-       OPTION(mds_use_tmap, 0, OPT_BOOL, true),        // use trivialmap for dir updates
-       OPTION(mds_default_dir_hash, 0, OPT_INT, CEPH_STR_HASH_RJENKINS),
-       OPTION(mds_log, 0, OPT_BOOL, true),
-       OPTION(mds_log_unsafe, 0, OPT_BOOL, false),      // only wait for log sync, when it's mostly safe to do so
-       OPTION(mds_log_skip_corrupt_events, 0, OPT_BOOL, false),
-       OPTION(mds_log_max_events, 0, OPT_INT, -1),
-       OPTION(mds_log_max_segments, 0, OPT_INT, 30),  // segment size defined by FileLayout, above
-       OPTION(mds_log_max_expiring, 0, OPT_INT, 20),
-       OPTION(mds_log_eopen_size, 0, OPT_INT, 100),   // # open inodes per log entry
-       OPTION(mds_bal_sample_interval, 0, OPT_FLOAT, 3.0),  // every 5 seconds
-       OPTION(mds_bal_replicate_threshold, 0, OPT_FLOAT, 8000),
-       OPTION(mds_bal_unreplicate_threshold, 0, OPT_FLOAT, 0),
-       OPTION(mds_bal_frag, 0, OPT_BOOL, false),
-       OPTION(mds_bal_split_size, 0, OPT_INT, 10000),
-       OPTION(mds_bal_split_rd, 0, OPT_FLOAT, 25000),
-       OPTION(mds_bal_split_wr, 0, OPT_FLOAT, 10000),
-       OPTION(mds_bal_split_bits, 0, OPT_INT, 3),
-       OPTION(mds_bal_merge_size, 0, OPT_INT, 50),
-       OPTION(mds_bal_merge_rd, 0, OPT_FLOAT, 1000),
-       OPTION(mds_bal_merge_wr, 0, OPT_FLOAT, 1000),
-       OPTION(mds_bal_interval, 0, OPT_INT, 10),           // seconds
-       OPTION(mds_bal_fragment_interval, 0, OPT_INT, 5),      // seconds
-       OPTION(mds_bal_idle_threshold, 0, OPT_FLOAT, 0),
-       OPTION(mds_bal_max, 0, OPT_INT, -1),
-       OPTION(mds_bal_max_until, 0, OPT_INT, -1),
-       OPTION(mds_bal_mode, 0, OPT_INT, 0),
-       OPTION(mds_bal_min_rebalance, 0, OPT_FLOAT, .1),  // must be this much above average before we export anything
-       OPTION(mds_bal_min_start, 0, OPT_FLOAT, .2),      // if we need less than this, we don't do anything
-       OPTION(mds_bal_need_min, 0, OPT_FLOAT, .8),       // take within this range of what we need
-       OPTION(mds_bal_need_max, 0, OPT_FLOAT, 1.2),
-       OPTION(mds_bal_midchunk, 0, OPT_FLOAT, .3),       // any sub bigger than this taken in full
-       OPTION(mds_bal_minchunk, 0, OPT_FLOAT, .001),     // never take anything smaller than this
-       OPTION(mds_bal_target_removal_min, 0, OPT_INT, 5), // min balance iterations before old target is removed
-       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_thrash_exports, 0, OPT_INT, 0),
-       OPTION(mds_thrash_fragments, 0, OPT_INT, 0),
-       OPTION(mds_dump_cache_on_map, 0, OPT_BOOL, false),
-       OPTION(mds_dump_cache_after_rejoin, 0, OPT_BOOL, false),
-       OPTION(mds_verify_scatter, 0, OPT_BOOL, false),
-       OPTION(mds_debug_scatterstat, 0, OPT_BOOL, false),
-       OPTION(mds_debug_frag, 0, OPT_BOOL, false),
-       OPTION(mds_kill_mdstable_at, 0, OPT_INT, 0),
-       OPTION(mds_kill_export_at, 0, OPT_INT, 0),
-       OPTION(mds_kill_import_at, 0, OPT_INT, 0),
-       OPTION(mds_kill_rename_at, 0, OPT_INT, 0),
-       OPTION(mds_wipe_sessions, 0, OPT_BOOL, 0),
-       OPTION(mds_wipe_ino_prealloc, 0, OPT_BOOL, 0),
-       OPTION(mds_skip_ino, 0, OPT_INT, 0),
-       OPTION(max_mds, 0, OPT_INT, 1),
-       OPTION(mds_standby_for_name, 0, OPT_STR, ""),
-       OPTION(mds_standby_for_rank, 0, OPT_INT, -1),
-       OPTION(mds_standby_replay, 0, OPT_BOOL, false),
-       OPTION(osd_data, 0, OPT_STR, ""),
-       OPTION(osd_journal, 0, OPT_STR, ""),
-       OPTION(osd_journal_size, 0, OPT_INT, 0),         // in mb
-       OPTION(osd_max_write_size, 0, OPT_INT, 90),
-       OPTION(osd_balance_reads, 0, OPT_BOOL, false),
-       OPTION(osd_flash_crowd_iat_threshold, 0, OPT_INT, 0),
-       OPTION(osd_flash_crowd_iat_alpha, 0, OPT_DOUBLE, 0.125),
-       OPTION(osd_shed_reads, 0, OPT_INT, false),     // forward from primary to replica
-       OPTION(osd_shed_reads_min_latency, 0, OPT_DOUBLE, .01),       // min local latency
-       OPTION(osd_shed_reads_min_latency_diff, 0, OPT_DOUBLE, .01),  // min latency difference
-       OPTION(osd_shed_reads_min_latency_ratio, 0, OPT_DOUBLE, 1.5),  // 1.2 == 20% higher than peer
-       OPTION(osd_client_message_size_cap, 0, OPT_LONGLONG, 500*1024L*1024L), // default to 200MB client data allowed in-memory
-       OPTION(osd_stat_refresh_interval, 0, OPT_DOUBLE, .5),
-       OPTION(osd_pg_bits, 0, OPT_INT, 9),  // bits per osd
-       OPTION(osd_pgp_bits, 0, OPT_INT, 6),  // bits per osd
-       OPTION(osd_lpg_bits, 0, OPT_INT, 2),  // bits per osd
-       OPTION(osd_pg_layout, 0, OPT_INT, CEPH_PG_LAYOUT_CRUSH),
-       OPTION(osd_min_rep, 0, OPT_INT, 1),
-       OPTION(osd_max_rep, 0, OPT_INT, 10),
-       OPTION(osd_min_raid_width, 0, OPT_INT, 3),
-       OPTION(osd_max_raid_width, 0, OPT_INT, 2),
-       OPTION(osd_pool_default_crush_rule, 0, OPT_INT, 0),
-       OPTION(osd_pool_default_size, 0, OPT_INT, 2),
-       OPTION(osd_pool_default_pg_num, 0, OPT_INT, 8),
-       OPTION(osd_pool_default_pgp_num, 0, OPT_INT, 8),
-       OPTION(osd_op_threads, 0, OPT_INT, 2),    // 0 == no threading
-       OPTION(osd_max_opq, 0, OPT_INT, 10),
-       OPTION(osd_disk_threads, 0, OPT_INT, 1),
-       OPTION(osd_recovery_threads, 0, OPT_INT, 1),
-       OPTION(osd_age, 0, OPT_FLOAT, .8),
-       OPTION(osd_age_time, 0, OPT_INT, 0),
-       OPTION(osd_heartbeat_interval, 0, OPT_INT, 1),
-       OPTION(osd_mon_heartbeat_interval, 0, OPT_INT, 30),  // if no peers, ping monitor
-       OPTION(osd_heartbeat_grace, 0, OPT_INT, 20),
-       OPTION(osd_mon_report_interval_max, 0, OPT_INT, 120),
-       OPTION(osd_mon_report_interval_min, 0, OPT_INT, 5),  // pg stats, failures, up_thru, boot.
-       OPTION(osd_min_down_reporters, 0, OPT_INT, 1),   // number of OSDs who need to report a down OSD for it to count
-       OPTION(osd_min_down_reports, 0, OPT_INT, 3),     // number of times a down OSD must be reported for it to count
-       OPTION(osd_replay_window, 0, OPT_INT, 45),
-       OPTION(osd_preserve_trimmed_log, 0, OPT_BOOL, true),
-       OPTION(osd_recovery_delay_start, 0, OPT_FLOAT, 15),
-       OPTION(osd_recovery_max_active, 0, OPT_INT, 5),
-       OPTION(osd_recovery_max_chunk, 0, OPT_LONGLONG, 1<<20),  // max size of push chunk
-       OPTION(osd_recovery_forget_lost_objects, 0, OPT_BOOL, false),   // off for now
-       OPTION(osd_max_scrubs, 0, OPT_INT, 1),
-       OPTION(osd_scrub_load_threshold, 0, OPT_FLOAT, 0.5),
-       OPTION(osd_scrub_min_interval, 0, OPT_FLOAT, 300),
-       OPTION(osd_scrub_max_interval, 0, OPT_FLOAT, 60*60*24),   // once a day
-       OPTION(osd_auto_weight, 0, OPT_BOOL, false),
-       OPTION(osd_class_error_timeout, 0, OPT_DOUBLE, 60.0),  // seconds
-       OPTION(osd_class_timeout, 0, OPT_DOUBLE, 60*60.0), // seconds
-       OPTION(osd_class_tmp, 0, OPT_STR, "/var/lib/ceph/tmp"),
-       OPTION(osd_check_for_log_corruption, 0, OPT_BOOL, false),
-       OPTION(osd_use_stale_snap, 0, OPT_BOOL, false),
-       OPTION(osd_max_notify_timeout, 0, OPT_INT, 30), // max notify timeout in seconds
-       OPTION(filestore, 0, OPT_BOOL, false),
-       OPTION(filestore_max_sync_interval, 0, OPT_DOUBLE, 5),    // seconds
-       OPTION(filestore_min_sync_interval, 0, OPT_DOUBLE, .01),  // seconds
-       OPTION(filestore_fake_attrs, 0, OPT_BOOL, false),
-       OPTION(filestore_fake_collections, 0, OPT_BOOL, false),
-       OPTION(filestore_dev, 0, OPT_STR, 0),
-       OPTION(filestore_btrfs_trans, 0, OPT_BOOL, false),
-       OPTION(filestore_btrfs_snap, 0, OPT_BOOL, true),
-       OPTION(filestore_btrfs_clone_range, 0, OPT_BOOL, true),
-       OPTION(filestore_fsync_flushes_journal_data, 0, OPT_BOOL, false),
-       OPTION(filestore_flusher, 0, OPT_BOOL, true),
-       OPTION(filestore_flusher_max_fds, 0, OPT_INT, 512),
-       OPTION(filestore_sync_flush, 0, OPT_BOOL, false),
-       OPTION(filestore_journal_parallel, 0, OPT_BOOL, false),
-       OPTION(filestore_journal_writeahead, 0, OPT_BOOL, false),
-       OPTION(filestore_journal_trailing, 0, OPT_BOOL, false),
-       OPTION(filestore_queue_max_ops, 0, OPT_INT, 500),
-       OPTION(filestore_queue_max_bytes, 0, OPT_INT, 100 << 20),
-       OPTION(filestore_op_threads, 0, OPT_INT, 2),
-       OPTION(filestore_commit_timeout, 0, OPT_FLOAT, 600),
-       OPTION(ebofs, 0, OPT_BOOL, false),
-       OPTION(ebofs_cloneable, 0, OPT_BOOL, true),
-       OPTION(ebofs_verify, 0, OPT_BOOL, false),
-       OPTION(ebofs_commit_ms, 0, OPT_INT, 200),       // 0 = no forced commit timeout (for debugging/tracing)
-       OPTION(ebofs_oc_size, 0, OPT_INT, 10000),      // onode cache
-       OPTION(ebofs_cc_size, 0, OPT_INT, 10000),      // cnode cache
-       OPTION(ebofs_bc_size, 0, OPT_LONGLONG, 50*256), // 4k blocks, *256 for MB
-       OPTION(ebofs_bc_max_dirty, 0, OPT_LONGLONG, 30*256), // before write() will block
-       OPTION(ebofs_max_prefetch, 0, OPT_INT, 1000), // 4k blocks
-       OPTION(ebofs_realloc, 0, OPT_BOOL, false),    // hrm, this can cause bad fragmentation, don't use!
-       OPTION(ebofs_verify_csum_on_read, 0, OPT_BOOL, true),
-       OPTION(journal_dio, 0, OPT_BOOL, true),
-       OPTION(journal_block_align, 0, OPT_BOOL, true),
-       OPTION(journal_max_write_bytes, 0, OPT_INT, 10 << 20),
-       OPTION(journal_max_write_entries, 0, OPT_INT, 100),
-       OPTION(journal_queue_max_ops, 0, OPT_INT, 500),
-       OPTION(journal_queue_max_bytes, 0, OPT_INT, 100 << 20),
-       OPTION(journal_align_min_size, 0, OPT_INT, 64 << 10),  // align data payloads >= this.
-       OPTION(bdev_lock, 0, OPT_BOOL, true),
-       OPTION(bdev_iothreads, 0, OPT_INT, 1),         // number of ios to queue with kernel
-       OPTION(bdev_idle_kick_after_ms, 0, OPT_INT, 100),  // ms
-       OPTION(bdev_el_fw_max_ms, 0, OPT_INT, 10000),      // restart elevator at least once every 1000 ms
-       OPTION(bdev_el_bw_max_ms, 0, OPT_INT, 3000),       // restart elevator at least once every 300 ms
-       OPTION(bdev_el_bidir, 0, OPT_BOOL, false),          // bidirectional elevator?
-       OPTION(bdev_iov_max, 0, OPT_INT, 512),            // max # iov's to collect into a single readv()/writev() call
-       OPTION(bdev_debug_check_io_overlap, 0, OPT_BOOL, true),  // [DEBUG] check for any pending io overlaps
-       OPTION(bdev_fake_mb, 0, OPT_INT, 0),
-       OPTION(bdev_fake_max_mb, 0, OPT_INT, 0),
-};
-
-const int num_config_options = sizeof(config_optionsp) / sizeof(config_option);
-
-bool conf_set_conf_val(void *field, opt_type_t type, const char *val)
-{
-  switch (type) {
-  case OPT_BOOL:
-    if (strcasecmp(val, "false") == 0)
-      *(bool *)field = false;
-    else if (strcasecmp(val, "true") == 0)
-      *(bool *)field = true;
-    else
-      *(bool *)field = (bool)atoi(val);
-    break;
-  case OPT_INT:
-    *(int *)field = atoi(val);
-    break;
-  case OPT_LONGLONG:
-    *(long long *)field = atoll(val);
-    break;
-  case OPT_STR:
-    if (val)
-      *(char **)field = strdup(val);
-    else
-      *(char **)field = NULL;
-    break;
-  case OPT_FLOAT:
-    *(float *)field = atof(val);
-    break;
-  case OPT_DOUBLE:
-    *(double *)field = strtod(val, NULL);
-    break;
-  case OPT_ADDR:
-    ((entity_addr_t *)field)->parse(val);
-    break;
-  default:
-    return false;
-  }
-
-  return true;
-}
-
-bool conf_set_conf_val(void *field, opt_type_t type, const char *val, long long intval, double doubleval)
-{
-  switch (type) {
-  case OPT_BOOL:
-    *(bool *)field = intval;
-    break;
-  case OPT_INT:
-    *(int *)field = intval;
-    break;
-  case OPT_LONGLONG:
-    *(long long *)field = intval;
-    break;
-  case OPT_STR:
-    if (val) {
-      *(char **)field = strdup(val);
-    } else {
-      *(char **)field = NULL;
-    }
-    break;
-  case OPT_FLOAT:
-    *(float *)field = doubleval;
-    break;
-  case OPT_DOUBLE:
-    *(double *)field = doubleval;
-    break;
-  case OPT_ADDR:
-    ((entity_addr_t *)field)->parse(val);
-    break;
-  default:
-    return false;
-  }
-
-  return true;
-}
-
-static bool conf_reset_val(void *field, opt_type_t type)
-{
-  switch (type) {
-  case OPT_BOOL:
-    *(bool *)field = 0;
-    break;
-  case OPT_INT:
-    *(int *)field = 0;
-    break;
-  case OPT_LONGLONG:
-    *(long long *)field = 0;
-    break;
-  case OPT_STR:
-      *(char **)field = NULL;
-    break;
-  case OPT_FLOAT:
-    *(float *)field = 0;
-    break;
-  case OPT_DOUBLE:
-    *(double *)field = 0;
-    break;
-  case OPT_ADDR:
-    *(entity_addr_t *)field = entity_addr_t();
-    break;
-  default:
-    return false;
-  }
-
-  return true;
-}
-
-static void set_conf_name(config_option *opt)
-{
-  char *newsection = (char *)opt->section;
-  char *newconf = (char *)opt->name;
-  int i;
-
-  if (opt->section[0] == 0) {
-    newsection = strdup("global");
-  }
-
-  if (strncmp(newsection, opt->name, strlen(newsection)) == 0) {
-    /* if key starts with the name of the section, remove name of the section
-       unless key equals to it */
-
-    if (strcmp(newsection, opt->name) == 0)
-      goto done;
-
-    newconf = strdup(&opt->name[strlen(newsection)+1]);
-  } else {
-    newconf = strdup(opt->name);
-  }
-
-  i = 0;
-  while (newconf[i]) {
-    if (newconf[i] == '_')
-      newconf[i] = ' ';
-
-    ++i;
-  }
-
-  done:
-    opt->section = newsection;
-    opt->conf_name = (const char *)newconf;
-}
-
-static int def_conf_to_str(config_option *opt, char *buf, int len)
-{
-  int ret = 0;
-
-  switch (opt->type) {
-  case OPT_INT:
-  case OPT_BOOL:
-    ret = snprintf(buf, len, "%d", (int)opt->def_longlong);
-    break;
-  case OPT_LONGLONG:
-    ret = snprintf(buf, len, "%lld", opt->def_longlong);
-    break;
-  case OPT_STR:
-  case OPT_ADDR:
-    ret = snprintf(buf, len, "%s", opt->def_str);
-    break;
-  case OPT_FLOAT:
-  case OPT_DOUBLE:
-    ret = snprintf(buf, len, "%f", opt->def_double);
-    break;
-  default:
-    break;
-  }
-  return ret;
-}
-
-int ceph_def_conf_by_name(const char *name, char *buf, int buflen)
-{
-  char *newname = strdup(name);
-  int len = strlen(name);
-  config_option *opt;
-  int ret = 0;
-  int i;
-
-  for (i = 0; i < len; i++) {
-    if (newname[i] == ' ')
-      newname[i] = '_';
-  }
-
-  len = sizeof(config_optionsp)/sizeof(config_option);
-
-  for (i = 0; i < len; i++) {
-    opt = &config_optionsp[i];
-    if (strcmp(opt->name, newname) == 0) {
-      ret = def_conf_to_str(opt, buf, buflen);
-      break;
-    }
-  }
-  free(newname);
-  return ret;
-}
-
-static bool cmd_is_char(const char *cmd)
-{
-       return ((cmd[0] == '-') &&
-               cmd[1] && !cmd[2]);
-}
-
-bool conf_cmd_equals(const char *cmd, const char *opt, char char_opt, unsigned int *val_pos)
-{
-       unsigned int i;
-       unsigned int len = strlen(opt);
-
-       *val_pos = 0;
-
-       if (!*cmd)
-               return false;
-
-       if (char_opt && cmd_is_char(cmd))
-               return (char_opt == cmd[1]);
-
-       if ((cmd[0] != '-') || (cmd[1] != '-'))
-               return false;
-
-       for (i=0; i<len; i++) {
-               if ((opt[i] == '_') || (opt[i] == '-')) {
-                       switch (cmd[i+2]) {
-                       case '-':
-                       case '_':
-                               continue;
-                       default:
-                               break;
-                       }
-               }
-
-               if (cmd[i+2] != opt[i])
-                       return false;
-       }
-
-       if (cmd[i+2] == '=')
-               *val_pos = i+3;
-       else if (cmd[i+2])
-               return false;
-
-       return true;
-}
-
-static bool get_var(const char *str, int pos, char *var_name, int len, int *new_pos)
-{
-  int bracket = (str[pos] == '{');
-  int out_pos = 0;
-
-  if (bracket) {
-    pos++;
-  }
-
-  while (str[pos] &&
-       ((bracket && str[pos] != '}') ||
-        isalnum(str[pos]) ||
-         str[pos] == '_')) {
-       var_name[out_pos] = str[pos];
-
-       out_pos ++;
-       if (out_pos == len)
-               return false;
-       pos++;
-  }
-
-  var_name[out_pos] = '\0';
-
-
-  if (bracket && (str[pos] == '}'))
-       pos++;
-
-  *new_pos = pos;
-
-  return true;
-}
-
-static const char *var_val(char *var_name)
-{
-       const char *val;
-
-       if (strcmp(var_name, "type")==0)
-               return g_conf.type;
-       if (strcmp(var_name, "id")==0)
-               return g_conf.id;
-       if (strcmp(var_name, "num")==0)
-               return g_conf.id;
-       if (strcmp(var_name, "name")==0)
-               return g_conf.name;
-       if (strcmp(var_name, "host")==0)
-               return g_conf.host;
-
-       val = getenv(var_name);
-       if (!val)
-               val = "";
-
-       return val;
-}
-
-#define MAX_LINE 256
-#define MAX_VAR_LEN 32
-
-char *conf_post_process_val(const char *val)
-{
-  char var_name[MAX_VAR_LEN];
-  char *buf;
-  int i=0;
-  size_t out_pos = 0;
-  size_t max_line = MAX_LINE;
-
-  buf = (char *)malloc(max_line);
-  *buf = 0;
-
-  while (val[i]) {
-    if (val[i] == '$') {
-       if (get_var(val, i+1, var_name, MAX_VAR_LEN, &i)) {
-               out_pos = dyn_snprintf(&buf, &max_line, 2, "%s%s", buf, var_val(var_name));
-       } else {
-         ++i;
-       }
-    } else {
-       if (out_pos == max_line - 1) {
-               max_line *= 2;
-               buf = (char *)realloc(buf, max_line);
-       }
-       buf[out_pos] = val[i];
-       buf[out_pos + 1] = '\0';
-       ++out_pos;
-       ++i;
-    }
-  }
-
-  buf[out_pos] = '\0';
-
-  return buf;
-}
-
-#define OPT_READ_TYPE(ret, section, var, type, out, def) \
-do { \
-  if (def) \
-    ret = g_conf.cf->read(section, var, (type *)out, *(type *)def); \
-  else \
-    ret = g_conf.cf->read(section, var, (type *)out, 0); \
-} while (0)
-
-int conf_read_key_ext(const char *conf_name, const char *conf_alt_name, const char *conf_type,
-                     const char *alt_section, const char *key, opt_type_t type, void *out, void *def,
-                     bool free_old_val)
-{
-  int s;
-  int ret;
-  char *tmp = 0;
-  for (s=0; s<5; s++) {
-    const char *section;
-
-    switch (s) {
-      case 0:
-          section = conf_name;
-          if (section)
-            break;
-      case 1:
-          section = conf_alt_name;
-          if (section)
-            break;
-      case 2:
-           s = 2;
-            section = conf_type;
-            if (section)
-              break;
-      case 3:
-           s = 3;
-            section = alt_section;
-           if (section)
-             break;
-      default:
-           s = 4;
-           section = "global";
-    }
-
-    switch (type) {
-    case OPT_STR:
-      if (free_old_val)
-        tmp = *(char **)out;
-      OPT_READ_TYPE(ret, section, key, char *, out, def);
-      if (free_old_val &&
-          *(char **)out != tmp)
-          free(tmp);
-      break;
-    case OPT_BOOL:
-      OPT_READ_TYPE(ret, section, key, bool, out, def);
-      break;
-    case OPT_LONGLONG:
-      OPT_READ_TYPE(ret, section, key, long long, out, def);
-      break;
-    case OPT_INT:
-      OPT_READ_TYPE(ret, section, key, int, out, def);
-      break;
-    case OPT_FLOAT:
-      OPT_READ_TYPE(ret, section, key, float, out, def);
-      break;
-    case OPT_DOUBLE:
-      OPT_READ_TYPE(ret, section, key, double, out, def);
-      break;
-    case OPT_ADDR:
-      ret = g_conf.cf->read(section, key, &tmp, (char *)def);
-      if (*tmp == *((char *)def)) {
-          ret = 0;
-      }
-      else {
-        ret = 1;
-      }
-      if ((1 == ret) &&!(((entity_addr_t*)out)->parse(tmp))) {
-        cerr << "Addr " << tmp << " failed to parse! Shutting down" << std::endl;
-        exit(1);
-      }
-      break;
-    case OPT_U32:
-      OPT_READ_TYPE(ret, section, key, uint32_t, out, def);
-      break;
-    default:
-       ret = 0;
-        break;
-    }
-
-    if (ret)
-       break;
-  }
-
-  return ret;
-}
-
-int conf_read_key(const char *alt_section, const char *key, opt_type_t type, void *out, void *def, bool free_old_val)
-{
-       return conf_read_key_ext(g_conf.name, g_conf.alt_name, g_conf.type,
-                                alt_section, key, type, out, def, free_old_val);
-}
-
-bool parse_config_file(ConfFile *cf, bool auto_update)
-{
-  int opt_len = sizeof(config_optionsp)/sizeof(config_option);
-
-  cf->set_post_process_func(conf_post_process_val);
-  if (!cf->parse())
-       return false;
-
-  for (int i=0; i<opt_len; i++) {
-      config_option *opt = &config_optionsp[i];
-      conf_read_key(NULL, opt->conf_name, opt->type, opt->val_ptr, opt->val_ptr, true);
-  }
-  conf_read_key(NULL, "lockdep", OPT_INT, &g_lockdep, &g_lockdep, false);
-
-  return true;
-}
-
-bool is_bool_param(const char *param)
-{
-       return ((strcasecmp(param, "true")==0) || (strcasecmp(param, "false")==0));
-}
-
-bool ceph_resolve_file_search(std::string& filename_list, std::string& result)
-{
-  list<string> ls;
-  get_str_list(filename_list, ls);
-
-  list<string>::iterator iter;
-  for (iter = ls.begin(); iter != ls.end(); ++iter) {
-    int fd = ::open(iter->c_str(), O_RDONLY);
-    if (fd < 0)
-      continue;
-
-    close(fd);
-    result = *iter;
-    return true;
-  }
-
-  return false;
-}
-
-md_config_t::md_config_t()
-  : cf(NULL)
-{
-       //
-       // Note: because our md_config_t structure is a global, the memory used to
-       // store it will start out zeroed. So there is no need to manually initialize
-       // everything to 0 here.
-       //
-       // However, it's good practice to add your new config option to config_optionsp
-       // so that its default value is explicit rather than implicit.
-       //
-
-  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->val_ptr) {
-      conf_reset_val(opt->val_ptr, opt->type);
-    }
-    if (!conf_set_conf_val(opt->val_ptr,
-                          opt->type,
-                          opt->def_str,
-                          opt->def_longlong,
-                          opt->def_double)) {
-                       std::ostringstream oss;
-                       oss << "error initializing g_conf value num " << i;
-                       assert(oss.str().c_str() == 0);
-    }
-
-    set_conf_name(opt);
-  }
-
-  g_conf.id = strdup("admin");
-}
-
-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;
-}
-
diff --git a/src/config.h b/src/config.h
deleted file mode 100644 (file)
index e005d31..0000000
+++ /dev/null
@@ -1,537 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
- *
- * 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 
- * Foundation.  See file COPYING.
- * 
- */
-
-#ifndef CEPH_CONFIG_H
-#define CEPH_CONFIG_H
-
-extern struct ceph_file_layout g_default_file_layout;
-
-#include <vector>
-#include <map>
-
-#include "include/assert.h"
-
-#include "common/Mutex.h"
-
-#define OSD_REP_PRIMARY 0
-#define OSD_REP_SPLAY   1
-#define OSD_REP_CHAIN   2
-
-
-#include "msg/msg_types.h"
-
-#ifdef HAVE_LIBTCMALLOC
-#include <google/heap-profiler.h>
-#endif //HAVE_LIBTCMALLOC
-
-struct EntityName;
-
-enum log_to_stderr_t {
-  LOG_TO_STDERR_NONE = 0,
-  LOG_TO_STDERR_SOME = 1,
-  LOG_TO_STDERR_ALL = 2,
-};
-
-struct ConfFile;
-
-struct md_config_t {
-  md_config_t();
-  ~md_config_t();
-
-  ConfFile *cf;
-
-  char *type;
-  char *id;
-  char *name;
-  char *alt_name;
-  char *host;
-
-  int num_client;
-
-  //bool mkfs;
-  
-  const char *monmap;
-  const char *mon_host;
-  bool daemonize;
-
-  //profiling
-  bool tcmalloc_have;
-  bool tcmalloc_profiler_run;
-  void (*profiler_start)(const char*);
-  bool (*profiler_running)();
-  void (*profiler_stop)();
-  void (*profiler_dump)(const char*);
-  int profiler_allocation_interval;
-  int profiler_highwater_interval;
-
-  // profiling logger
-  bool profiling_logger;
-  int profiling_logger_interval;
-  bool profiling_logger_calc_variance;
-  const char *profiling_logger_subdir;
-  const char *profiling_logger_dir;
-
-  const char *log_file;
-  const char *log_dir;
-  const char *log_sym_dir;
-  int log_sym_history;
-
-  int log_to_stderr;
-
-  bool log_to_syslog;
-  bool log_per_instance;
-  bool log_to_file;
-
-  bool clog_to_monitors;
-  bool clog_to_syslog;
-
-  const char *pid_file;
-
-  char *conf;
-
-  const char *chdir;
-
-  int kill_after;
-
-  long long max_open_files;
-
-  int debug;
-  int debug_lockdep;
-  int debug_mds;
-  int debug_mds_balancer;
-  int debug_mds_log;
-  int debug_mds_log_expire;
-  int debug_mds_migrator;
-  int debug_buffer;
-  int debug_timer;
-  int debug_filer;
-  int debug_objecter;
-  int debug_rados;
-  int debug_rbd;
-  int debug_journaler;
-  int debug_objectcacher;
-  int debug_client;
-  int debug_osd;
-  int debug_ebofs;
-  int debug_filestore;
-  int debug_journal;
-  int debug_bdev;
-  int debug_ms;
-  int debug_mon;
-  int debug_monc;
-  int debug_paxos;
-  int debug_tp;
-  int debug_auth;
-  int debug_finisher;
-
-  // auth
-  char *key;
-  char *keyfile;
-  char *keyring;
-
-  // messenger
-
-  /*bool tcp_skip_rank0;
-  bool tcp_overlay_clients;
-  bool tcp_log;
-  bool tcp_serial_marshall;
-  bool tcp_serial_out;
-  bool tcp_multi_out;
-  bool tcp_multi_dispatch;
-  */
-  entity_addr_t public_addr;
-  entity_addr_t cluster_addr;
-
-  bool ms_tcp_nodelay;
-  double ms_initial_backoff;
-  double ms_max_backoff;
-  bool ms_nocrc;
-  bool ms_die_on_bad_msg;
-  uint64_t ms_dispatch_throttle_bytes;
-  bool ms_bind_ipv6;
-  uint64_t ms_rwthread_stack_bytes;
-  uint64_t ms_tcp_read_timeout;
-  uint64_t ms_inject_socket_failures;
-
-  // mon
-  const char *mon_data;
-  int mon_tick_interval;
-  double mon_subscribe_interval;
-  int mon_osd_down_out_interval;
-  float mon_lease;
-  float mon_lease_renew_interval;
-  float mon_clock_drift_allowed;
-  float mon_clock_drift_warn_backoff;
-  float mon_lease_ack_timeout;
-  float mon_accept_timeout;
-  float mon_pg_create_interval;
-  int mon_osd_full_ratio;
-  int mon_osd_nearfull_ratio;
-  int mon_globalid_prealloc;
-  int mon_osd_report_timeout;
-
-  double paxos_propose_interval;
-  double paxos_min_wait;
-  double paxos_observer_timeout;
-
-  // auth
-  char *auth_supported;
-  double auth_mon_ticket_ttl;
-  double auth_service_ticket_ttl;
-  EntityName *entity_name;
-
-  double mon_client_hunt_interval;
-  double mon_client_ping_interval;
-
-  // client
-  int      client_cache_size;
-  float    client_cache_mid;
-  int      client_cache_stat_ttl;
-  int      client_cache_readdir_ttl;
-  bool     client_use_random_mds;          // debug flag
-  double   client_mount_timeout;
-  double   client_unmount_timeout;
-  double   client_tick_interval;
-  const char *client_trace;
-  long long client_readahead_min;
-  long long client_readahead_max_bytes;
-  long long client_readahead_max_periods;
-  const char *client_snapdir;
-  const char *client_mountpoint;
-
-  // objectcacher
-  bool     client_oc;
-  int      client_oc_size;
-  int      client_oc_max_dirty;
-  int      client_oc_target_dirty;
-  long long unsigned   client_oc_max_sync_write;
-
-  int      client_notify_timeout;
-
-  // objecter
-  double objecter_mon_retry_interval;
-  double objecter_tick_interval;
-  double objecter_timeout;
-  uint64_t objecter_inflight_op_bytes;
-
-  // journaler
-  bool  journaler_allow_split_entries;
-  bool  journaler_safe;
-  int   journaler_write_head_interval;
-  bool  journaler_cache;
-  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;
-  float mds_cache_mid;
-  int   mds_mem_max;
-  float mds_dir_commit_ratio;
-  int   mds_dir_max_commit_size;
-  
-  float mds_decay_halflife;
-
-  float mds_beacon_interval;
-  float mds_beacon_grace;
-  float mds_blacklist_interval;
-
-  float mds_session_timeout;
-  float mds_session_autoclose;
-  float mds_reconnect_timeout;
-
-  float mds_tick_interval;
-  float mds_dirstat_min_interval;
-  float mds_scatter_nudge_interval;
-
-  int mds_client_prealloc_inos;
-  bool mds_early_reply;
-
-  bool mds_use_tmap;
-
-  int mds_default_dir_hash;
-
-  bool mds_log;
-  bool mds_log_unsafe;
-  bool mds_log_skip_corrupt_events;
-  int mds_log_max_events;
-  int mds_log_max_segments;
-  int mds_log_max_expiring;
-  int mds_log_eopen_size;
-  
-  float mds_bal_sample_interval;  
-  float mds_bal_replicate_threshold;
-  float mds_bal_unreplicate_threshold;
-  bool mds_bal_frag;
-  int mds_bal_split_size;
-  float mds_bal_split_rd;
-  float mds_bal_split_wr;
-  int mds_bal_split_bits;
-  int mds_bal_merge_size;
-  float mds_bal_merge_rd;
-  float mds_bal_merge_wr;
-  int   mds_bal_interval;
-  int   mds_bal_fragment_interval;
-  float mds_bal_idle_threshold;
-  int   mds_bal_max;
-  int   mds_bal_max_until;
-
-  int   mds_bal_mode;
-  float mds_bal_min_rebalance;
-  float mds_bal_min_start;
-  float mds_bal_need_min;
-  float mds_bal_need_max;
-  float mds_bal_midchunk;
-  float mds_bal_minchunk;
-
-  int mds_bal_target_removal_min;
-  int mds_bal_target_removal_max;
-
-  float mds_replay_interval;
-
-  int   mds_shutdown_check;
-
-  int mds_thrash_exports;
-  int mds_thrash_fragments;
-  bool mds_dump_cache_on_map;
-  bool mds_dump_cache_after_rejoin;
-
-  // set these to non-zero to specify kill points
-  bool mds_verify_scatter;
-  bool mds_debug_scatterstat;
-  bool mds_debug_frag;
-  int mds_kill_mdstable_at;
-  int mds_kill_export_at;
-  int mds_kill_import_at;
-  int mds_kill_rename_at;
-
-  bool mds_wipe_sessions;
-  bool mds_wipe_ino_prealloc;
-  int mds_skip_ino;
-  int max_mds;
-
-  int mds_standby_for_rank;
-  char* mds_standby_for_name;
-  bool mds_standby_replay;
-
-  // osd
-  const char *osd_data;
-  const char *osd_journal;
-  int osd_journal_size;  // in mb
-  int osd_max_write_size; // in MB
-  bool osd_balance_reads;
-  int osd_flash_crowd_iat_threshold;  // flash crowd interarrival time threshold in ms
-  double osd_flash_crowd_iat_alpha;
-
-  int  osd_shed_reads;
-  double osd_shed_reads_min_latency;
-  double osd_shed_reads_min_latency_diff;
-  double osd_shed_reads_min_latency_ratio;
-
-  uint64_t osd_client_message_size_cap;
-
-  double osd_stat_refresh_interval;
-
-  int   osd_pg_bits;
-  int   osd_pgp_bits;
-  int   osd_lpg_bits;
-  int   osd_pg_layout;
-  int   osd_min_rep;
-  int   osd_max_rep;
-  int   osd_min_raid_width;
-  int   osd_max_raid_width;
-
-  int osd_pool_default_crush_rule;
-  int osd_pool_default_size;
-  int osd_pool_default_pg_num;
-  int osd_pool_default_pgp_num;
-
-  int   osd_op_threads;
-  int   osd_max_opq;
-  int   osd_disk_threads;
-  int   osd_recovery_threads;
-
-  float   osd_age;
-  int   osd_age_time;
-  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;
-  int   osd_min_down_reporters;
-  int   osd_min_down_reports;
-  int   osd_replay_window;
-  bool  osd_preserve_trimmed_log;
-
-  float osd_recovery_delay_start;
-  int osd_recovery_max_active;
-  uint64_t osd_recovery_max_chunk;
-
-  bool osd_recovery_forget_lost_objects;
-
-  bool osd_auto_weight;
-
-  double osd_class_error_timeout;
-  double osd_class_timeout;
-  const char *osd_class_tmp;
-
-  int osd_max_scrubs;
-  float osd_scrub_load_threshold;
-  float osd_scrub_min_interval;
-  float osd_scrub_max_interval;
-
-  bool osd_check_for_log_corruption;  // bleh
-
-  bool osd_use_stale_snap;
-
-  uint32_t osd_max_notify_timeout;
-
-  // filestore
-  bool filestore;
-  double   filestore_max_sync_interval;
-  double   filestore_min_sync_interval;
-  bool  filestore_fake_attrs;
-  bool  filestore_fake_collections;
-  const char  *filestore_dev;
-  bool filestore_btrfs_trans;
-  bool filestore_btrfs_snap;
-  bool filestore_btrfs_clone_range;
-  bool filestore_fsync_flushes_journal_data;
-  bool filestore_flusher;
-  int filestore_flusher_max_fds;
-  bool filestore_sync_flush;
-  bool filestore_journal_parallel;
-  bool filestore_journal_writeahead;
-  bool filestore_journal_trailing;
-  int filestore_queue_max_ops;
-  int filestore_queue_max_bytes;
-  int filestore_op_threads;
-  float filestore_commit_timeout;
-  
-  // ebofs
-  bool  ebofs;
-  bool  ebofs_cloneable;
-  bool  ebofs_verify;
-  int   ebofs_commit_ms;
-  int   ebofs_oc_size;
-  int   ebofs_cc_size;
-  unsigned long long ebofs_bc_size;
-  unsigned long long ebofs_bc_max_dirty;
-  unsigned ebofs_max_prefetch;
-  bool  ebofs_realloc;
-  bool ebofs_verify_csum_on_read;
-  
-  // journal
-  bool journal_dio;
-  bool journal_block_align;
-  int journal_max_write_bytes;
-  int journal_max_write_entries;
-  int journal_queue_max_ops;
-  int journal_queue_max_bytes;
-  int journal_align_min_size;
-
-  // block device
-  bool  bdev_lock;
-  int   bdev_iothreads;
-  int   bdev_idle_kick_after_ms;
-  int   bdev_el_fw_max_ms;  
-  int   bdev_el_bw_max_ms;
-  bool  bdev_el_bidir;
-  int   bdev_iov_max;
-  bool  bdev_debug_check_io_overlap;
-  int   bdev_fake_mb;
-  int   bdev_fake_max_mb;
-
-#ifdef USE_OSBDB
-  bool bdbstore;
-  int debug_bdbstore;
-  bool bdbstore_btree;
-  int bdbstore_ffactor;
-  int bdbstore_nelem;
-  int bdbstore_pagesize;
-  int bdbstore_cachesize;
-  bool bdbstore_transactional;
-#endif // USE_OSBDB
-};
-
-extern md_config_t g_conf;     
-
-typedef enum {
-       OPT_NONE, OPT_INT, OPT_LONGLONG, OPT_STR, OPT_DOUBLE, OPT_FLOAT, OPT_BOOL,
-       OPT_ADDR, OPT_U32
-} opt_type_t;
-
-char *conf_post_process_val(const char *val);
-int conf_read_key(const char *alt_section, const char *key, opt_type_t type, void *out, void *def, bool free_old_val = false);
-bool conf_set_conf_val(void *field, opt_type_t type, const char *val);
-bool conf_cmd_equals(const char *cmd, const char *opt, char char_opt, unsigned int *val_pos);
-int ceph_def_conf_by_name(const char *name, char *buf, int len);
-
-bool ceph_resolve_file_search(string& filename_list, string& result);
-
-#define CONF_NEXT_VAL (val_pos ? &args[i][val_pos] : args[++i])
-
-#define CONF_SET_ARG_VAL(dest, type) \
-       conf_set_conf_val(dest, type, CONF_NEXT_VAL)
-
-#define CONF_VAL args[i]
-
-#define CONF_SAFE_SET_ARG_VAL_USAGE(dest, type, show_usage) \
-       do { \
-          __isarg = i+1 < args.size(); \
-          if (__isarg && !val_pos && \
-              args[i+1][0] == '-' && args[i+1][1] != '\0') \
-              __isarg = false; \
-          if (type == OPT_BOOL) { \
-               if (val_pos) { \
-                       CONF_SET_ARG_VAL(dest, type); \
-               } else \
-                       conf_set_conf_val(dest, type, "true"); \
-          } else if (__isarg || val_pos) { \
-               CONF_SET_ARG_VAL(dest, type); \
-         } else if (show_usage && args_usage) \
-               args_usage(); \
-       } while (0)
-
-#define CONF_SAFE_SET_ARG_VAL(dest, type) CONF_SAFE_SET_ARG_VAL_USAGE(dest, type, true)
-
-#define CONF_SET_BOOL_ARG_VAL(dest) \
-       conf_set_conf_val(dest, OPT_BOOL, (val_pos ? &args[i][val_pos] : "true"))
-
-#define CONF_ARG_EQ(str_cmd, char_cmd) \
-       conf_cmd_equals(args[i], str_cmd, char_cmd, &val_pos)
-
-struct config_option {
-  const char *section;
-  const char *conf_name;
-  const char *name;
-  void *val_ptr;
-
-  const char *def_str;
-  long long def_longlong;
-  double def_double;
-
-  opt_type_t type;
-  char char_option;  // if any
-};
-
-extern struct config_option config_optionsp[];
-extern const int num_config_options;
-
-extern bool parse_config_file(ConfFile *cf, bool auto_update);
-
-#include "common/debug.h"
-
-#endif
index b851ba50a956c27351993225d93ba34ed4a5e574..464b73967fa18e78c6468980b977c8de68499a46 100644 (file)
@@ -21,7 +21,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "mon/MonMap.h"
 #include "mon/MonClient.h"
index ce66368b77fca9ed0ef455b2cdc4f196756bf184..05e4829fd3798d91657a3cc16b51bf12f5b39d5a 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <sys/stat.h>
 
-#include "config.h"
+#include "common/config.h"
 
 #include "common/ceph_argparse.h"
 #include "common/common_init.h"
index b3c7d8250552cf4fd3e7f787a7f3866cd7ee911d..26c5baacd770408da3a484ffe18f078ca51602ac 100644 (file)
@@ -17,7 +17,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "client/SyntheticClient.h"
 #include "client/Client.h"
index 34fb541103bef31bb424fc27885e3abad1903234..8fe581f8c282a2e4b1fc3ff50c1786615ae0d551 100644 (file)
@@ -17,7 +17,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "mon/MonMap.h"
 #include "mon/MonClient.h"
index 6d4ef1d3fd8fd8ab6448861f2c91933cd1d852bc..2232f868b2ea0f6c205488996589a9a8c0f2d83f 100644 (file)
@@ -14,7 +14,7 @@
 
 
 
-#include "config.h"
+#include "common/config.h"
 #include "Allocator.h"
 #include "Ebofs.h"
 
index 974e891ed0083cf16b4b964ffafda48f61f8c865..0c4df82d6f1ff247d2d99aa94c2b17940d82023f 100644 (file)
@@ -12,7 +12,7 @@
  * 
  */
 
-#include "config.h"
+#include "common/config.h"
 #include "BlockDevice.h"
 
 
index bc8ec91984d1e74d149f916c092bb532453bee9e..e05ea1f6175f4fe054fab84d64bf432da4b7b56e 100644 (file)
@@ -21,7 +21,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "mon/MonMap.h"
 
index 4609b5a41e5db9de729d3f932e79003d273d0ab4..e7bc67f6fe3095865ac116591613dfb4929c3b62 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef CEPH_CONTEXT_H
 #define CEPH_CONTEXT_H
 
-#include "config.h"
+#include "common/config.h"
 
 #include "assert.h"
 #include <list>
index 37d3eb6301535f84d19c3520bc421851f33271b4..bb3c551ccbcc3c3d96e82008ee3adbdfd737cdab 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <stdint.h>
 
-#include "config.h"
+#include "common/config.h"
 
 
 
index 0a12881a641f0f5d45b8e1da7038e22d1a437c6b..5c788009a01394480238e8f09eca84c2204c76a1 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 #define __STDC_FORMAT_MACROS
-#include "config.h"
+#include "common/config.h"
 
 #include "common/ceph_argparse.h"
 #include "common/common_init.h"
index 3d3cdf7efe762eae195e84e3abc9a0bc5f3e487a..4486c6367067bb3678a659ee0013672e87b7012d 100644 (file)
@@ -22,7 +22,7 @@
 #include <pthread.h>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "mon/MonMap.h"
 #include "mds/MDS.h"
index 8e574158189506b45ac5ff34fdbebc7ef8f8c0a8..51ebec3488c0bee9c70d2a12c13166707e5c6f8b 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 #define __STDC_FORMAT_MACROS
-#include "config.h"
+#include "common/config.h"
 
 #include "common/common_init.h"
 #include "common/ceph_argparse.h"
index 1d8dddb21967a0de652b457977bff46d576f2ddf..db237db95a97b0e80e05ebe52d9ccfe2f1f3504e 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "messages/MMDSTableRequest.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef dout_prefix
index 2c991885aaa70d640a828fad67bff60294d608b5..10c6ba713de26edb5d527ef6bb112eea6c2fa57d 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "osdc/Objecter.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef dout_prefix
index 100c555c60adff69cd45518f138d0ede5e910f30..3790dfe189f6b93dd89cb8581cb837666f8cfc2d 100644 (file)
@@ -20,7 +20,7 @@
 #include "include/types.h"
 #include "include/buffer.h"
 #include "mdstypes.h"
-#include "config.h"
+#include "common/config.h"
 #include "common/DecayCounter.h"
 
 #include <iostream>
index 4ecdddd85bcf12f6a33645ebc8d0caa7da9fef56..cf5a127bcaa8283ce7e69d1d80cca47a423dc05f 100644 (file)
@@ -41,7 +41,7 @@
 #include <string>
 #include <stdio.h>
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef dout_prefix
index 2cf264c627c51ec4048cd134c5c2234631462639..f801acfe335c0436f3b3d8150a10a4e29ba96d0c 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef CEPH_CINODE_H
 #define CEPH_CINODE_H
 
-#include "config.h"
+#include "common/config.h"
 #include "include/dlist.h"
 #include "include/elist.h"
 #include "include/types.h"
index 4793289834069f946698a69d650ecdb680deed9b..6d32f31663e00c2732d76e8a1e3457401b752502 100644 (file)
@@ -19,7 +19,7 @@
 #include "include/buffer.h"
 #include "include/xlist.h"
 
-#include "config.h"
+#include "common/config.h"
 
 /*
 
index acfd99b361e907fc20c29aa88c3c23cb16b741e4..a20f3cf5c9e02a30ff89452317fe13947dd71c78 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "include/types.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef dout_prefix
index 5d5d9da50bd70784ae465477f29461f01c54c8e3..8c77adedb3358f43349dc56a39117b4f8065e421 100644 (file)
@@ -52,7 +52,7 @@
 
 #include <errno.h>
 
-#include "config.h"
+#include "common/config.h"
 
 
 #define DOUT_SUBSYS mds
index 1bdf19500e772d214548652be375100b12cbdc88..f02f0521719e32f975e6a6712ef9fcf6a2852508 100644 (file)
@@ -12,7 +12,7 @@
  * 
  */
 
-#include "config.h"
+#include "common/config.h"
 #include "LogEvent.h"
 
 #include "MDS.h"
index 47e2d4958124fb1e444c210442f325eb48e6001b..06d94433845d6662b5e8a511c7a5422a4d97aaac 100644 (file)
@@ -33,7 +33,7 @@
 using std::map;
 using std::vector;
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef DOUT_COND
index 91153519366deceb3437f18eea0c746ff2ba9c3a..ad3b0e35db03374d782a4fb30d4e8dbc585a8693 100644 (file)
@@ -87,7 +87,7 @@
 #include <map>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef dout_prefix
index 52258851f71a75c5427b53d8c5404ad60dcbdb1c..622023b02eaa0c61bb2fa460a47bba8ec92adda2 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "events/ESubtreeMap.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef DOUT_COND
index 1837f650e8d5106337daeb9cbb8c7fd312867d37..4bf59aaa7647a87aabbd64b75d94496b1a3561fc 100644 (file)
@@ -68,7 +68,7 @@
 #include "auth/AuthAuthorizeHandler.h"
 #include "auth/KeyRing.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef dout_prefix
index 6e8a9fa7f5ff8cf4ea0b27b1a12e0575322c01e4..708844817dc6fa008c39cb420371de421245af2d 100644 (file)
@@ -25,7 +25,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "include/CompatSet.h"
 
index 31dd74815d53a98da7c5354ec6a0743ee72acc14..eab1eeb3e5ab61f51a6baaf25fd537c611b0ec88 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "include/types.h"
 
-#include "config.h"
+#include "common/config.h"
 
 
 #define DOUT_SUBSYS mds
index 3356eb508899dd3b91e0a72ea7c1bcc57382c30c..71b86a662d4243c78b135fa6550a4505b76cf0b3 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "messages/MMDSTableRequest.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef dout_prefix
index 0db6879a924bbfc02307ba7fc39ea5f62da86555..120f5cb32dcb5b2ad8b50a20568cbf2f90055f5a 100644 (file)
@@ -56,7 +56,7 @@
 
 
 
-#include "config.h"
+#include "common/config.h"
 
 
 #define DOUT_SUBSYS mds
index 5608c5fb6cd20d07fe701ff46be83c4fa2ead7b0..524432be23b12d0dc6837eda3a515aa83efe72c5 100644 (file)
@@ -58,7 +58,7 @@
 #include <iostream>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef dout_prefix
index 1c4dc11e38e02548a282ec0de92c33a8fa8774e8..07dba4773c01be8cf44518fa6842b97ba402bbcd 100644 (file)
@@ -17,7 +17,7 @@
 #include "SessionMap.h"
 #include "osdc/Filer.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef dout_prefix
index 97778830ed6aa6712b52d5c03141daca884009d7..443020f806d2fcd04ddf84f89f9fd90e0e1cf9fd 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "msg/Messenger.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef dout_prefix
index 156197f73167a919a6a1be0c2b9873f8d16baa05..3313d17f038c63a189de4a72ac898557d640d0db 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_EEXPORT_H
 #define CEPH_EEXPORT_H
 
-#include "config.h"
+#include "common/config.h"
 #include "include/types.h"
 
 #include "../MDS.h"
index 1e3d83322938db797d5f58f03700b1eda099fa7f..f8c8b39838d86e88ef7c32326275946a3b5ec48d 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_EIMPORTFINISH_H
 #define CEPH_EIMPORTFINISH_H
 
-#include "config.h"
+#include "common/config.h"
 #include "include/types.h"
 
 #include "../MDS.h"
index f8c1c602ef2930716a26a5f6837bbc3d9e1b6ff8..bd5acfc3cce78f7d8b07c6d64ebfdfc2b8e3f1b4 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_EIMPORTSTART_H
 #define CEPH_EIMPORTSTART_H
 
-#include "config.h"
+#include "common/config.h"
 #include "include/types.h"
 
 #include "../MDS.h"
index b2671613437d846063113d776cb7610bd8bb28ee..e68e2ef3462c062fc04199220a759cb2c476dac9 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_MDS_ESESSION_H
 #define CEPH_MDS_ESESSION_H
 
-#include "config.h"
+#include "common/config.h"
 #include "include/types.h"
 
 #include "../LogEvent.h"
index 05bc47048040f0507ac8e41021d076596d73d19e..9b090cee394ace1ba72039356086150861ca73d8 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_MDS_ESESSIONS_H
 #define CEPH_MDS_ESESSIONS_H
 
-#include "config.h"
+#include "common/config.h"
 #include "include/types.h"
 
 #include "../LogEvent.h"
index d4d0b35f864bf49449fa1ff648e0e70cbca68c05..ba570fb36acc74ec4402ec5144a2f2434bbb26f2 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_MDS_ETABLECLIENT_H
 #define CEPH_MDS_ETABLECLIENT_H
 
-#include "config.h"
+#include "common/config.h"
 #include "include/types.h"
 
 #include "../mds_table_types.h"
index e96d34a13495a351401af94d7d46cdf8160b418f..68e16c962dc5b45882c25d8fc79defb030d08282 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef CEPH_MDS_ETABLESERVER_H
 #define CEPH_MDS_ETABLESERVER_H
 
-#include "config.h"
+#include "common/config.h"
 #include "include/types.h"
 
 #include "../mds_table_types.h"
index eb4fbd8407a441c33b8bb8f0286f4057b08b232d..1b0be3e398065326352af699d4f516b98d7df9e6 100644 (file)
@@ -12,7 +12,7 @@
  * 
  */
 
-#include "config.h"
+#include "common/config.h"
 #include "osdc/Journaler.h"
 #include "events/EString.h"
 #include "events/ESubtreeMap.h"
@@ -51,7 +51,7 @@
 #include "Locker.h"
 
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mds
 #undef DOUT_COND
index 161b1ff4856e65350dda4064c225a1de10a83945..30c81bf3e396dce164063ede124b616317a05ca5 100644 (file)
@@ -14,7 +14,7 @@
 #include <map>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 #include "common/DecayCounter.h"
 #include "include/Context.h"
 
index ba8812c3603914eaded641439a684fbfcb144564..96f2832a9f23f8dc4e63f2a96bc2711542a9738f 100644 (file)
@@ -31,7 +31,7 @@
 #include "osd/osd_types.h"
 #include "osd/PG.h"  // yuck
 
-#include "config.h"
+#include "common/config.h"
 #include <sstream>
 
 #define DOUT_SUBSYS mon
index 7413599d9a0469f8262a844dc82c5c2ff7a5e0cf..53b958eaa83689b759989c9428bb23c1f55dbe74 100644 (file)
@@ -27,7 +27,7 @@
 #include "osd/osd_types.h"
 #include "osd/PG.h"  // yuck
 
-#include "config.h"
+#include "common/config.h"
 #include <sstream>
 
 #define DOUT_SUBSYS mon
index 16a5a365989897cb18bb44d44adc23ad0f290db1..12370870f57c49ae59a1ecd18372ad6ae7e41977 100644 (file)
@@ -20,7 +20,7 @@
 #include "MonmapMonitor.h"
 #include "messages/MMonElection.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mon
 #undef dout_prefix
index a29b08e9dee63d633d8829516a318160cccadf25..6203d64ecbd2a3c7cf425cde3acd755eaeb5db4b 100644 (file)
@@ -26,7 +26,7 @@
 #include "osd/osd_types.h"
 #include "osd/PG.h"  // yuck
 
-#include "config.h"
+#include "common/config.h"
 #include <sstream>
 
 #define DOUT_SUBSYS mon
index b599496b97fdb2f7fc1dcb2aa19bf1e00e309269..bb8f54b521f6861d5b5caeacff9af485d3b27bf2 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <sstream>
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mon
 #undef dout_prefix
index f79ba4c47e3ce8ff8fb1af3438a8a7fd04ad1a53..92e252ec463cffab60b0d70bf43e5910ab49196c 100644 (file)
@@ -1,5 +1,5 @@
 #include <errno.h>
-#include "config.h"
+#include "common/config.h"
 #include "MonCaps.h"
 #include "mon_types.h"
 
index e57b80e0d21798026ca6e81c433c546976ce5c72..9b6fcd070a0c4f34a443fb5eb46484b5244c7d34 100644 (file)
@@ -32,7 +32,7 @@
 #include "include/str_list.h"
 #include "include/addr_parsing.h"
 
-#include "config.h"
+#include "common/config.h"
 
 
 #define DOUT_SUBSYS monc
index 16d52dfd5d1fea192474f270a45bd7152a0615bc..ddf49b435f9d7ba7327d19a798f6ad9f9da5baaa 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "msg/Message.h"
 #include "include/types.h"
-//#include "config.h"
+//#include "common/config.h"
 
 class MonMap {
  public:
index a10f49247458c5552c57fe2b44159bbb6bd76bd6..211c84d5355f1d84b8a66abbb5f121065aed16e0 100644 (file)
@@ -56,7 +56,7 @@
 
 #include "auth/AuthSupported.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #include <errno.h>
 #include <limits.h>
index 8d56d915ed1b69fbfa0767526685dd38e4c107c0..409c43767ceaa91517a2814c4fb012c6a31987f5 100644 (file)
@@ -17,7 +17,7 @@
 #include "common/errno.h"
 #include "common/run_cmd.h"
 #include "common/safe_io.h"
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mon
 #undef dout_prefix
index 9651cb14780a2bb7414c95e5898f4e5d94f7edc5..46267b43c423004a83eee8ea5a2f0461cef305b5 100644 (file)
@@ -23,7 +23,7 @@
 #include "mon/PGMonitor.h"
 
 #include <sstream>
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS mon
 #undef dout_prefix
index 44b8e9213d7730ae3470c85799fde88b20a5956a..8848390fc0fbcd149dc5ade7d9567b185f336eee 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "common/Timer.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #include <sstream>
 
index 9c18cf4b2f886f91966470e9732e7547b308bc54..af5f8b2fb79141261dc74c204023c3c4fdb77565 100644 (file)
@@ -22,7 +22,7 @@
 #define CEPH_PGMAP_H
 
 #include "osd/osd_types.h"
-#include "config.h"
+#include "common/config.h"
 #include <sstream>
 
 class PGMap {
index 4157e7f64c08b975a0aeb5717c914b23faa04a0b..235e1db720081cffb7a742b4ab8be1bda435de65 100644 (file)
@@ -35,7 +35,7 @@
 #include "osd/osd_types.h"
 #include "osd/PG.h"  // yuck
 
-#include "config.h"
+#include "common/config.h"
 #include <sstream>
 
 #define DOUT_SUBSYS mon
index f0a253b5aed36a846c93fbaae3a1d49ae77948c5..ec50a200f81a90ed3f94f606065fd4652222bfa4 100644 (file)
@@ -19,7 +19,7 @@
 #include "messages/MMonPaxos.h"
 #include "messages/MMonObserveNotify.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS paxos
 #undef dout_prefix
index 544877c546f4b63436280cf27f86da5d2de3aebf..915e4e13f9aaefa0557950467be42ba6734ab962 100644 (file)
@@ -18,7 +18,7 @@
 
 
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS paxos
 #undef dout_prefix
index 0e09ef7e9641f6614d3768b00b0abcb12f8e4cd6..65dceb0dc6209cfc6a1856b6a4aa7bff433ebe56 100644 (file)
@@ -22,7 +22,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 #include "common/ceph_argparse.h"
 #include "common/common_init.h"
 #include "mon/MonMap.h"
index b995014dc46f2d745a19311d1c16e96ca55bf520..21fc913a8d7391a383a42ecb8dddc3e0e9158ace 100644 (file)
@@ -17,7 +17,7 @@
 #define CEPH_DISPATCHER_H
 
 #include "Message.h"
-#include "config.h"
+#include "common/config.h"
 #include "auth/Auth.h"
 
 class Messenger;
index e8451b00f5d9e06a6cbed810bd2ac4ad74300cfa..2f6c37a4699a6d79c5ed86699999e56139815c4f 100644 (file)
@@ -128,7 +128,7 @@ using namespace std;
 
 #include "messages/MWatchNotify.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DEBUGLVL  10    // debug level of output
 
index d49d13ee0de0a7957b96ef2c4659e69548a16a25..3758b1be6e1e00d5a9efcae10778facd35c91a21 100644 (file)
@@ -17,7 +17,7 @@
  
 /* public message types */
 #include "include/types.h"
-#include "config.h"
+#include "common/config.h"
 
 // monitor internal
 #define MSG_MON_ELECTION           65
index fd44face98d4ad6a3f53cab052535cb723750cc6..da22c7ccbd07048768ab99d6f153803905ce1da8 100644 (file)
@@ -24,7 +24,7 @@
 #include <limits.h>
 #include <sys/user.h>
 
-#include "config.h"
+#include "common/config.h"
 
 #include "messages/MGenericMessage.h"
 
index 71d85f17f8169f0dee6d63392713a0015760c31e..aa9c21f177b2f0ab9c9ed08c5f7569db89785841 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <poll.h>
 #include "tcp.h"
-#include "config.h"
+#include "common/config.h"
 
 /******************
  * tcp crap
index fd057f511c743b647e14bb64fb17736347acc5e2..44299b8a5eb2ab57018dab240823be56f0126004 100644 (file)
@@ -1,5 +1,5 @@
 
-#include "config.h"
+#include "common/config.h"
 
 #include "objclass/objclass.h"
 #include "osd/OSD.h"
index 4bb31c82041e5371936d7e25c7a2888ea8844699..3041f55c7bf20e46bfaeb2c229774dfcc1420748 100644 (file)
@@ -1,4 +1,4 @@
-#include "config.h"
+#include "common/config.h"
 
 #include "objclass/objclass.h"
 
index d46c5dcb50f63a5ceef6ae2a0411eab06a9b9b9f..a902d4af034dfd568cba0108943ab0b89ecf6569 100644 (file)
@@ -12,7 +12,7 @@
  * 
  */
 
-#include "config.h"
+#include "common/config.h"
 #include "common/errno.h"
 #include "common/safe_io.h"
 #include "FileJournal.h"
index dd4181885dffd0fc1446c72aab74fa5292e1d60c..d094dbbba7ebbd887fe578b5582de384cdf8d7d2 100644 (file)
@@ -70,7 +70,7 @@
 # endif
 #endif
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS filestore
 #undef dout_prefix
index afe006f269c4ad6f80c3ab63ab45bfd11a13c70f..6e3dd4b86b6e67ca68e4cbdc9b5e0be391dc900a 100644 (file)
@@ -1,7 +1,7 @@
 
 #include "JournalingObjectStore.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS journal
 #undef dout_prefix
index 67164ad2eca3cc90205ab97fc776d0b124faaa9c..9d10e8c5a5b052c7cfcc8e00659d1bf14eef2935 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ObjectStore.h"
 
-#include "config.h"
+#include "common/config.h"
 #include "common/Clock.h"
 
 #define dout_prefix *_dout << "ager: "
index b7b0d65a7670b8117501a95be21f1038572062eb..fb227d9757b3c1c5014fda57a96fba2dfaca6afe 100644 (file)
@@ -6,7 +6,7 @@
 #include "Ager.h"
 #include "os/ObjectStore.h"
 
-#include "config.h"
+#include "common/config.h"
 #include "common/Clock.h"
 
 // ick
index 44df6581849fdb47192ad92bcd0197fb5d7b691c..e4af9d4f55ca88564d549f16d95cc69a6e11fb59 100644 (file)
@@ -99,7 +99,7 @@
 
 #include "objclass/objclass.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS osd
 #undef dout_prefix
index 7c70f5be428d0e8b407d95f7fd36eb9bcdbb9c98..fda0872473c2535a5d027d68ffec06efe5116730 100644 (file)
@@ -1,7 +1,7 @@
 
 #include "OSDCaps.h"
 
-#include "config.h"
+#include "common/config.h"
 
 
 
index f8d10f63a546f2e6cef8f90b4d16dc41cc6fd10b..937f98108c0c29b99e9f6c3b264f219ddfb23aa1 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "OSDMap.h"
 
-#include "config.h"
+#include "common/config.h"
 
 
 
index e7d955522107c3ff79159a0cc3cd56a627ef5722..d291919ccfab1e07a089087796197b7f31e6fdfb 100644 (file)
@@ -21,7 +21,7 @@
  *   disks, disk groups, total # osds,
  *
  */
-#include "config.h"
+#include "common/config.h"
 #include "include/types.h"
 #include "osd_types.h"
 #include "msg/Message.h"
index 1e919794c43409c589d26ef902a0017d86943a85..605d2d2faaddf93723396c97da66ab3587d918d1 100644 (file)
@@ -15,7 +15,7 @@
 
 
 #include "PG.h"
-#include "config.h"
+#include "common/config.h"
 #include "OSD.h"
 
 #include "common/Timer.h"
index fdaba7b2cc494ac2c67f6693e2fb84d09ae38bd2..7aa81ee63046f45b3523fe5f4b1f8a15ab600bde 100644 (file)
@@ -22,7 +22,7 @@
 #include "messages/MOSDPGNotify.h"
 #include "messages/MOSDPGRemove.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS osd
 #undef dout_prefix
index cbe29e2257da8692179850980217a11ec003ebe1..ca224186eb5b3e462d0e4bb23daaea3e46c04f8b 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "mds/inode_backtrace.h" // Ugh
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS osd
 #define DOUT_PREFIX_ARGS this, osd->whoami, osd->osdmap
index 126c46bfd0ba1caed0a0cbffd98bb018eb2f796a..f993276a99b664bea10a739a1f4ca1db8cf122a9 100644 (file)
@@ -6,7 +6,7 @@
 #include "ReplicatedPG.h"
 #include "Watch.h"
 
-#include "config.h"
+#include "common/config.h"
 
 bool Watch::ack_notification(entity_name_t& watcher, Notification *notif)
 {
index ab3c0272009f199cc36c6fa7d67bccc8bd80e14e..7e50e4967f8c11cbd7fd6a1c8718d24459cc0427 100644 (file)
@@ -19,7 +19,7 @@
 #include <map>
 
 #include "OSD.h"
-#include "config.h"
+#include "common/config.h"
 
 class MWatchNotify;
 
index 4038947156892ddbcc4df26c9445618e74b35d9c..18aa2fb19c610ce525c8285d44a827970ac254b7 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "include/Context.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS filer
 #undef dout_prefix
index de4707450daa4b1fb345094c032c8b2d64a255a6..4d96cb86b3ed4e69c5308a23c5ba3230543e7e92 100644 (file)
@@ -18,7 +18,7 @@
 #include "common/ProfLogger.h"
 #include "msg/Messenger.h"
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS journaler
 #undef dout_prefix
index b738fe9b4873a27ff880c12639802d2113e781c3..d0c00458bb2634889dce052c05f29db80ec3fef2 100644 (file)
@@ -38,7 +38,7 @@
 
 #include <errno.h>
 
-#include "config.h"
+#include "common/config.h"
 
 #define DOUT_SUBSYS objecter
 #undef dout_prefix
index 993240320f7502a8be5a6880fc4885408f82bf25..7b87eea1c400a596e3d9918d21cb3c4eca32614f 100644 (file)
@@ -15,7 +15,7 @@
  * it will just loop forever.
  */
 #include "include/rados/librados.h"
-#include "config.h"
+#include "common/config.h"
 #include "common/common_init.h"
 #include "common/Cond.h"
 #include <iostream>
index 19802528c6727d2714a539f503394cfd04f8b139..05881ab84ef0caf3697f7ced409a526318ceede6 100644 (file)
@@ -22,7 +22,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "common/errno.h"
 #include "osd/OSDMap.h"
index fe1b310905af78810d50a393882882aa62e0d562..39099115e577e307f798cac23f562d560e5df0db 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "crush/CrushWrapper.h"
 #include "osd/OSDMap.h"
-#include "config.h"
+#include "common/config.h"
 #include "include/buffer.h"
 
 int main(int argc, char **argv)
index f729ebd34542edb98287ce9a0182d8be7d78b695..02f41201e246afe71e458e5a25ae5c29d2deeac1 100644 (file)
@@ -19,7 +19,7 @@ using namespace librados;
 
 #include "osdc/rados_bencher.h"
 
-#include "config.h"
+#include "common/config.h"
 #include "common/ceph_argparse.h"
 #include "common/common_init.h"
 #include "common/Cond.h"
index 3ff6e171053eb71e7e9081052572c81176246f2f..b95675c40cb0369131f98fbd278d9dfe60b62239 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 #define __STDC_FORMAT_MACROS
-#include "config.h"
+#include "common/config.h"
 
 #include "common/errno.h"
 #include "common/ceph_argparse.h"
index 8586ee6e890fda881cfca4697ca35b704cba15ea..4c46419ab2d7d14e7f9ddd155c8f4a5db12fbc3d 100644 (file)
@@ -5,7 +5,7 @@
 
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include <cryptopp/osrng.h>
 #include "common/ceph_argparse.h"
index c37b96322c0bb7c6d584121ea27e8d9fba878692..0ac1a3d48d7c64234df48b9af679f7bcce771db4 100644 (file)
@@ -21,7 +21,7 @@
 #include "common/DoutStreambuf.h"
 #include "common/ceph_argparse.h"
 #include "common/common_init.h"
-#include "config.h"
+#include "common/config.h"
 
 #include <iostream>
 #include <sstream>
index 3f12e1e681dce0f94c8c5e484539f2cb49f36054..9283532816a57fbbe518c0d73cd49936fea74fb6 100644 (file)
@@ -21,7 +21,7 @@
 #include "common/ceph_argparse.h"
 #include "common/common_init.h"
 #include "common/errno.h"
-#include "config.h"
+#include "common/config.h"
 
 #include <errno.h>
 #include <iostream>
index 831fad86e563eba9984c2412c5c64e881902b7cf..9fcdef41525c1eeb760fb02b24f8bc4d21f63580 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 #include "common/armor.h"
-#include "config.h"
+#include "common/config.h"
 #include "include/buffer.h"
 #include "include/encoding.h"
 
index 9ea1c84a4824d6310266b1d6ca704406e19900f6..225e3312fd684efcf71d0cc7de935f93cbc34a34 100644 (file)
@@ -1,4 +1,4 @@
-#include "config.h"
+#include "common/config.h"
 #include "include/buffer.h"
 #include "include/encoding.h"
 
index 994a460d785b5047e8764856a30c44dae7ad12c5..a065e19f3e2f855a742cbbd05e50c659139cfdd5 100644 (file)
@@ -11,7 +11,7 @@
  * Foundation.  See file COPYING.
  * 
  */
-#include "config.h"
+#include "common/config.h"
 #include "include/Context.h"
 #include "gtest/gtest.h"
 
index 3d0125992d257bed3f9a95aafc31ff87bf93bb62..9d6700185b0ba5ee502246b6953ea92621ab400f 100644 (file)
@@ -3,7 +3,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 #include "messages/MPing.h"
 #include "common/Mutex.h"
 
index 19eea46a5c1fc948a0bc2601cc7a4e88b15052fa..73d584f34826d9dd125556d925ae9dab1412447f 100644 (file)
@@ -1,4 +1,4 @@
-#include "config.h"
+#include "common/config.h"
 #include "common/run_cmd.h"
 
 #include "gtest/gtest.h"
index 5927d3c2aa5109d4d93604899b934870c2e07856..1a66f4b06755ff2f5570fe4cb2f08fbbd1af9b59 100644 (file)
@@ -1,4 +1,4 @@
-#include "config.h"
+#include "common/config.h"
 #include "common/signal.h"
 
 #include "gtest/gtest.h"
index 3b827ac79f36934db6c08345d87f4e7f5d747cb6..b67afb20b7dc83c60eb55ee87fbe6a4eff456572 100644 (file)
@@ -1,7 +1,7 @@
 #include "auth/Crypto.h"
 #include "common/Clock.h"
 
-#include "config.h"
+#include "common/config.h"
 
 
 #define AES_KEY_LEN    16
index 7224e1054be5386d3ef5ce6505ec2f992453e515..b43480f37f7e021fcdce2d4eee1e3da2479097bf 100644 (file)
@@ -1,6 +1,6 @@
 #include "auth/cephx/CephxKeyServer.h"
 
-#include "config.h"
+#include "common/config.h"
 
 
 #define AES_KEY_LEN    16
index e0b6a074fbea0a93540ae8e4d25f8eead8b72de1..c92ef95e216717926139f5d98e195028669f6087 100644 (file)
@@ -17,7 +17,7 @@
 #include <string>
 using namespace std;
 
-#include "config.h"
+#include "common/config.h"
 
 #include "mon/MonMap.h"
 #include "mon/MonClient.h"
index 9996d4e1fa9b5e283ea485f324d6269ef9975fce..b4c42e7853e0612dd725e27ca2cf391c40d8f912 100644 (file)
@@ -17,7 +17,7 @@
 #include "common/common_init.h"
 #include "common/errno.h"
 #include "common/safe_io.h"
-#include "config.h"
+#include "common/config.h"
 #include "tools/common.h"
 
 #include <limits.h>
index 99b66e5ff9e60702deb28ec9985df240a1add9f2..930d9c714b5f25a72f6d2caa4921e28dd51c21b5 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "common/common_init.h"
 #include "common/ceph_argparse.h"
-#include "config.h"
+#include "common/config.h"
 #include "tools/common.h"
 
 #include <iostream>