]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
config: drop old debug_* items
authorSage Weil <sage.weil@dreamhost.com>
Fri, 30 Mar 2012 03:31:26 +0000 (20:31 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 30 Mar 2012 03:31:26 +0000 (20:31 -0700)
...and replace code references with conf->subsys.should_gather().

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/common/config.cc
src/common/config.h
src/mds/MDCache.cc
src/mds/Migrator.cc
src/rgw/rgw_op.cc
src/rgw/rgw_rados.cc

index b18b00fa37200fe5eec07e53a7e35eb6ab04d2c2..9314d495ea463ae41b577fa90dddb948839539a5 100644 (file)
@@ -85,8 +85,7 @@ const void *config_option::conf_ptr(const md_config_t *conf) const
 struct config_option config_optionsp[] = {
 #define OPTION(name, type, def_val) \
        { STRINGIFY(name), type, offsetof(struct md_config_t, name) },
-#define SUBSYS(name, log, gather)              \
-  { "debug_" STRINGIFY(name), OPT_INT, offsetof(struct md_config_t, debug_##name) },
+#define SUBSYS(name, log, gather)
 #define DEFAULT_SUBSYS(log, gather)
 #include "common/config_opts.h"
 #undef OPTION
@@ -119,8 +118,8 @@ bool ceph_resolve_file_search(const std::string& filename_list,
 md_config_t::md_config_t()
   : 
 #define OPTION(name, type, def_val) name(def_val),
-#define SUBSYS(name, log, gather) debug_##name(log),
-#define DEFAULT_SUBSYS(log, gather) debug(log),
+#define SUBSYS(name, log, gather)
+#define DEFAULT_SUBSYS(log, gather)
 #include "common/config_opts.h"
 #undef OPTION
 #undef SUBSYS
index 4c350704b0441a4ecc324a714e5785917f2e8411..df835f8be3a997c71b437e6af417e95801a6d17c 100644 (file)
@@ -178,8 +178,8 @@ public:
 #define OPTION_OPT_U32(name) const uint32_t name;
 #define OPTION_OPT_U64(name) const uint64_t name;
 #define OPTION(name, ty, init) OPTION_##ty(name)
-#define SUBSYS(name, log, gather) OPTION_OPT_INT(debug_##name)
-#define DEFAULT_SUBSYS(log, gather) OPTION_OPT_INT(debug)
+#define SUBSYS(name, log, gather)
+#define DEFAULT_SUBSYS(log, gather)
 #include "common/config_opts.h"
 #undef OPTION_OPT_INT
 #undef OPTION_OPT_LONGLONG
index 542750d86d138d90f270b3b890fd7715b79f448a..d6c1822cc310bd804b231b0ea2b55a336a90c9cb 100644 (file)
@@ -9972,7 +9972,7 @@ void MDCache::show_subtrees(int dbl)
 {
   //dout(10) << "show_subtrees" << dendl;
 
-  if (dbl > g_conf->debug && dbl > g_conf->debug_mds) 
+  if (!g_conf->subsys.should_gather(ceph_subsys_mds, dbl))
     return;  // i won't print anything.
 
   if (subtrees.empty()) {
index 7301875327b27833700eccba29a819a90613ad84..5f727a91dff2b50a0c5eddf8269f1ef3fbab461c 100644 (file)
@@ -496,7 +496,8 @@ void Migrator::show_exporting()
 
 void Migrator::audit()
 {
-  if (g_conf->debug_mds < 5) return;  // hrm.
+  if (!g_conf->subsys.should_gather(ceph_subsys_mds, 5))
+    return;  // hrm.
 
   // import_state
   show_importing();
index adce22cab49f481005b6c0d286d31ac74f29b4e8..d88438c5d8ef6710d029d1174434f435841c4f4c 100644 (file)
@@ -180,7 +180,7 @@ static int get_policy_from_attr(CephContext *cct, void *ctx, RGWAccessControlPol
         ldout(cct, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
         return -EIO;
       }
-      if (cct->_conf->debug_rgw >= 15) {
+      if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
         RGWAccessControlPolicy_S3 *s3policy = static_cast<RGWAccessControlPolicy_S3 *>(policy);
         ldout(cct, 15) << "Read AccessControlPolicy";
         s3policy->to_xml(*_dout);
@@ -1311,7 +1311,7 @@ void RGWPutACLs::execute()
     goto done;
   }
 
-  if (s->cct->_conf->debug_rgw >= 15) {
+  if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
     ldout(s->cct, 15) << "Old AccessControlPolicy";
     policy->to_xml(*_dout);
     *_dout << dendl;
@@ -1321,7 +1321,7 @@ void RGWPutACLs::execute()
   if (ret < 0)
     goto done;
 
-  if (s->cct->_conf->debug_rgw >= 15) {
+  if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
     ldout(s->cct, 15) << "New AccessControlPolicy:";
     new_policy.to_xml(*_dout);
     *_dout << dendl;
@@ -1696,7 +1696,7 @@ int RGWHandler::init(struct req_state *_s, FCGX_Request *fcgx)
 {
   s = _s;
 
-  if (s->cct->_conf->debug_rgw >= 20) {
+  if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
     char *p;
     for (int i=0; (p = fcgx->envp[i]); ++i) {
       ldout(s->cct, 20) << p << dendl;
index a66f5521190046b4c9753c83d9c3c643f051f938..fe1088b6df3dcf58c8e3546be04585b6904986fe 100644 (file)
@@ -1980,7 +1980,7 @@ int RGWRados::prepare_get_obj(void *ctx, rgw_obj& obj,
 
   if (attrs) {
     *attrs = astate->attrset;
-    if (cct->_conf->debug_rgw >= 20) {
+    if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
       for (iter = attrs->begin(); iter != attrs->end(); ++iter) {
         ldout(cct, 20) << "Read xattr: " << iter->first << dendl;
       }