Remove "#include debug.h" from config.h

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
This commit is contained in:
Colin Patrick McCabe 2011-06-22 13:42:28 -07:00
parent 2305a7a4f7
commit c9cf19c5ce
28 changed files with 60 additions and 40 deletions

View File

@ -18,6 +18,7 @@ using namespace std;
#include "common/ConfUtils.h"
#include "common/ceph_argparse.h"
#include "global/global_context.h"
#include "global/global_init.h"
#include "auth/Crypto.h"
#include "auth/Auth.h"

View File

@ -14,6 +14,7 @@
#include "common/Clock.h"
#include "common/ceph_context.h"
#include "common/config.h"
#include "include/utime.h"

View File

@ -14,10 +14,12 @@
#include "common/DoutStreambuf.h"
#include "common/ceph_argparse.h"
#include "common/ceph_context.h"
#include "common/ceph_crypto.h"
#include "common/code_environment.h"
#include "common/common_init.h"
#include "common/config.h"
#include "common/dout.h"
#include "common/errno.h"
#include "common/safe_io.h"
#include "common/version.h"

View File

@ -529,6 +529,4 @@ struct config_option {
const void *conf_ptr(const md_config_t *conf) const;
};
#include "common/debug.h" // TODO: remove
#endif

View File

@ -13,7 +13,7 @@
*/
#include "BackTrace.h"
#include "Clock.h"
#include "common/config.h"
#include "common/dout.h"
#include "common/environment.h"
#include "include/types.h"
#include "lockdep.h"

View File

@ -19,10 +19,12 @@
#include <sys/stat.h>
#include "common/debug.h"
#include "common/errno.h"
#include "common/config.h"
#include "common/ceph_argparse.h"
#include "global/global_context.h"
#include "global/global_init.h"
#include "crush/CrushWrapper.h"
#include "crush/grammar.h"

View File

@ -18,10 +18,12 @@
#include "common/code_environment.h"
#include "common/common_init.h"
#include "common/config.h"
#include "common/debug.h"
#include "common/errno.h"
#include "common/safe_io.h"
#include "common/signal.h"
#include "common/version.h"
#include "global/global_context.h"
#include "global/global_init.h"
#include "global/pidfile.h"
#include "global/signal_handler.h"

View File

@ -16,7 +16,7 @@
#ifndef CEPH_CONTEXT_H
#define CEPH_CONTEXT_H
#include "common/config.h"
#include "common/dout.h"
#include "assert.h"
#include <list>

View File

@ -393,24 +393,24 @@ public:
_splits[x] += childbits;
}
bool force_to_leaf(frag_t x) {
bool force_to_leaf(CephContext *cct, frag_t x) {
if (is_leaf(x))
return false;
generic_dout(10) << "force_to_leaf " << x << " on " << _splits << dendl;
lgeneric_dout(cct, 10) << "force_to_leaf " << x << " on " << _splits << dendl;
frag_t parent = get_branch_or_leaf(x);
assert(parent.bits() <= x.bits());
generic_dout(10) << "parent is " << parent << dendl;
lgeneric_dout(cct, 10) << "parent is " << parent << dendl;
// do we need to split from parent to x?
if (parent.bits() < x.bits()) {
int spread = x.bits() - parent.bits();
int nb = get_split(parent);
generic_dout(10) << "spread " << spread << ", parent splits by " << nb << dendl;
lgeneric_dout(cct, 10) << "spread " << spread << ", parent splits by " << nb << dendl;
if (nb == 0) {
// easy: split parent (a leaf) by the difference
generic_dout(10) << "splitting parent " << parent << " by spread " << spread << dendl;
lgeneric_dout(cct, 10) << "splitting parent " << parent << " by spread " << spread << dendl;
split(parent, spread);
assert(is_leaf(x));
return true;
@ -426,7 +426,7 @@ public:
for (std::list<frag_t>::iterator p = subs.begin();
p != subs.end();
++p) {
generic_dout(10) << "splitting intermediate " << *p << " by " << (nb-spread) << dendl;
lgeneric_dout(cct, 10) << "splitting intermediate " << *p << " by " << (nb-spread) << dendl;
split(*p, nb - spread, false);
}
}
@ -440,13 +440,13 @@ public:
q.pop_front();
int nb = get_split(t);
if (nb) {
generic_dout(10) << "merging child " << t << " by " << nb << dendl;
lgeneric_dout(cct, 10) << "merging child " << t << " by " << nb << dendl;
merge(t, nb, false); // merge this point, and
t.split(nb, q); // queue up children
}
}
generic_dout(10) << "force_to_leaf done" << dendl;
lgeneric_dout(cct, 10) << "force_to_leaf done" << dendl;
assert(is_leaf(x));
return true;
}

View File

@ -17,6 +17,7 @@
#include "common/ceph_argparse.h"
#include "global/global_init.h"
#include "global/global_context.h"
#include "include/rados/librados.h"
void usage()

View File

@ -42,6 +42,7 @@
#include <stdio.h>
#include "common/config.h"
#include "global/global_context.h"
#define DOUT_SUBSYS mds
#undef dout_prefix
@ -1328,7 +1329,7 @@ void CInode::decode_lock_state(int type, bufferlist& bl)
for (set<frag_t>::iterator p = authfrags.begin(); p != authfrags.end(); ++p)
if (!dirfragtree.is_leaf(*p)) {
dout(10) << " forcing frag " << *p << " to leaf (split|merge)" << dendl;
dirfragtree.force_to_leaf(*p);
dirfragtree.force_to_leaf(g_ceph_context, *p);
dirfragtreelock.mark_dirty(); // ok bc we're auth and caller will handle
}
} else {
@ -1342,7 +1343,7 @@ void CInode::decode_lock_state(int type, bufferlist& bl)
p++)
if (!dirfragtree.is_leaf(p->first)) {
dout(10) << " forcing open dirfrag " << p->first << " to leaf (racing with split|merge)" << dendl;
dirfragtree.force_to_leaf(p->first);
dirfragtree.force_to_leaf(g_ceph_context, p->first);
}
}
if (g_conf->mds_debug_frag)

View File

@ -8817,7 +8817,7 @@ CDir *MDCache::add_replica_dir(bufferlist::iterator& p, CInode *diri, int from,
if (!diri->dirfragtree.is_leaf(df.frag)) {
dout(7) << "add_replica_dir forcing frag " << df.frag << " to leaf in the fragtree "
<< diri->dirfragtree << dendl;
diri->dirfragtree.force_to_leaf(df.frag);
diri->dirfragtree.force_to_leaf(g_ceph_context, df.frag);
}
// add replica.
@ -9257,7 +9257,7 @@ void MDCache::adjust_dir_fragments(CInode *diri,
// adjust fragtree
// yuck. we may have discovered the inode while it was being fragmented.
if (!diri->dirfragtree.is_leaf(basefrag))
diri->dirfragtree.force_to_leaf(basefrag);
diri->dirfragtree.force_to_leaf(g_ceph_context, basefrag);
if (bits > 0)
diri->dirfragtree.split(basefrag, bits);

View File

@ -5,6 +5,7 @@
#include <errno.h>
#include "common/debug.h"
#include "mdstypes.h"

View File

@ -1485,10 +1485,10 @@ protected:
if (waiting.empty())
get(PIN_WAITER);
waiting.insert(pair<uint64_t,Context*>(mask, c));
pdout(10,g_conf->debug_mds) << (mdsco_db_line_prefix(this))
<< "add_waiter " << hex << mask << dec << " " << c
<< " on " << *this
<< dendl;
// pdout(10,g_conf->debug_mds) << (mdsco_db_line_prefix(this))
// << "add_waiter " << hex << mask << dec << " " << c
// << " on " << *this
// << dendl;
}
virtual void take_waiting(uint64_t mask, list<Context*>& ls) {
@ -1497,17 +1497,17 @@ protected:
while (it != waiting.end()) {
if (it->first & mask) {
ls.push_back(it->second);
pdout(10,g_conf->debug_mds) << (mdsco_db_line_prefix(this))
<< "take_waiting mask " << hex << mask << dec << " took " << it->second
<< " tag " << hex << it->first << dec
<< " on " << *this
<< dendl;
// pdout(10,g_conf->debug_mds) << (mdsco_db_line_prefix(this))
// << "take_waiting mask " << hex << mask << dec << " took " << it->second
// << " tag " << hex << it->first << dec
// << " on " << *this
// << dendl;
waiting.erase(it++);
} else {
pdout(10,g_conf->debug_mds) << "take_waiting mask " << hex << mask << dec << " SKIPPING " << it->second
<< " tag " << hex << it->first << dec
<< " on " << *this
<< dendl;
// pdout(10,g_conf->debug_mds) << "take_waiting mask " << hex << mask << dec << " SKIPPING " << it->second
// << " tag " << hex << it->first << dec
// << " on " << *this
// << dendl;
it++;
}
}

View File

@ -21,6 +21,7 @@
#ifndef CEPH_PGMAP_H
#define CEPH_PGMAP_H
#include "common/debug.h"
#include "osd/osd_types.h"
#include "common/config.h"
#include <sstream>

View File

@ -1,5 +1,6 @@
#include "common/config.h"
#include "common/debug.h"
#include "objclass/objclass.h"
#include <stdio.h>

View File

@ -12,7 +12,7 @@
*
*/
#include "common/config.h"
#include "common/debug.h"
#include "common/errno.h"
#include "common/safe_io.h"
#include "FileJournal.h"

View File

@ -1,7 +1,7 @@
#include "JournalingObjectStore.h"
#include "common/config.h"
#include "common/debug.h"
#define DOUT_SUBSYS journal
#undef dout_prefix

View File

@ -6,8 +6,9 @@
#include "Ager.h"
#include "os/ObjectStore.h"
#include "common/config.h"
#include "common/Clock.h"
#include "common/debug.h"
#include "global/global_context.h"
// ick
#include <sys/types.h>

View File

@ -23,6 +23,7 @@ using namespace librados;
#include "common/ceph_argparse.h"
#include "global/global_init.h"
#include "common/Cond.h"
#include "common/debug.h"
#include "mds/inode_backtrace.h"
#include <iostream>
#include <fstream>

View File

@ -28,6 +28,7 @@
#include <unistd.h>
#include "common/ceph_argparse.h"
#include "global/global_context.h"
#include "global/global_init.h"
#include "common/config.h"
#include "common/errno.h"

View File

@ -17,15 +17,14 @@
#include "rgw/rgw_acl.h"
#include "rgw_acl.h"
#include "common/ceph_argparse.h"
#include "common/ceph_context.h"
#include "common/common_init.h"
#include "common/config.h"
#include "common/dout.h"
#include <errno.h>
#include <sstream>
#include <string.h>
#define RGW_LOG(x) pdout(x, g_conf->rgw_log)
int librgw_create(librgw_t *rgw, const char * const id)
{
CephInitParameters iparams(CEPH_ENTITY_TYPE_CLIENT, CEPH_CONF_FILE_DEFAULT);
@ -66,11 +65,11 @@ int librgw_acl_bin2xml(librgw_t rgw, const char *bin, int bin_len, char **xml)
return 0;
}
catch (const std::exception &e) {
RGW_LOG(-1) << "librgw_acl_bin2xml: caught exception " << e.what() << dendl;
lderr(rgw) << "librgw_acl_bin2xml: caught exception " << e.what() << dendl;
return -2000;
}
catch (...) {
RGW_LOG(-1) << "librgw_acl_bin2xml: caught unknown exception " << dendl;
lderr(rgw) << "librgw_acl_bin2xml: caught unknown exception " << dendl;
return -2000;
}
}
@ -111,10 +110,10 @@ int librgw_acl_xml2bin(librgw_t rgw, const char *xml, char **bin, int *bin_len)
return 0;
}
catch (const std::exception &e) {
RGW_LOG(-1) << "librgw_acl_bin2xml: caught exception " << e.what() << dendl;
lderr(rgw) << "librgw_acl_bin2xml: caught exception " << e.what() << dendl;
}
catch (...) {
RGW_LOG(-1) << "librgw_acl_bin2xml: caught unknown exception " << dendl;
lderr(rgw) << "librgw_acl_bin2xml: caught unknown exception " << dendl;
}
if (!bin_)
free(bin_);

View File

@ -16,6 +16,7 @@
#include "os/FileStore.h"
#include "global/global_init.h"
#include "common/ceph_argparse.h"
#include "common/debug.h"
#undef dout_prefix
#define dout_prefix *_dout

View File

@ -20,8 +20,10 @@
*/
#include "common/DoutStreambuf.h"
#include "common/ceph_argparse.h"
#include "global/global_init.h"
#include "common/config.h"
#include "common/debug.h"
#include "global/global_context.h"
#include "global/global_init.h"
#include <iostream>
#include <set>

View File

@ -21,6 +21,7 @@
#include "common/ceph_argparse.h"
#include "global/global_init.h"
#include "common/errno.h"
#include "common/debug.h"
#include "common/config.h"
#include <errno.h>

View File

@ -17,6 +17,7 @@
*/
#include "common/ceph_argparse.h"
#include "common/debug.h"
#include "common/config.h"
#include "global/global_init.h"
#include "include/rados/librados.hpp"

View File

@ -14,6 +14,7 @@
#include <iostream>
#include "common/ceph_argparse.h"
#include "common/debug.h"
#include "os/FileStore.h"
#include "global/global_init.h"

View File

@ -2,6 +2,7 @@
#include "common/Clock.h"
#include "common/config.h"
#include "common/debug.h"
#define AES_KEY_LEN 16