Merge pull request #15052 from batrick/i19734

mds: use debug_mds for most subsys

Reviewed-by: John Spray <john.spray@redhat.com>
This commit is contained in:
John Spray 2017-05-15 22:31:27 +01:00 committed by GitHub
commit 6f1bf0dd9b
7 changed files with 17 additions and 20 deletions

View File

@ -88,8 +88,6 @@ particular daemons are set under the daemon section in your configuration file
[mds]
debug mds = 1
debug mds balancer = 1
debug mds log = 1
debug mds migrator = 1
See `Subsystem, Log and Debug Settings`_ for details.
@ -171,7 +169,7 @@ as ``debug ms = 1/5``. For example:
debug {subsystem} = {log-level}/{memory-level}
#for example
debug mds log = 1/20
debug mds balancer = 1/20
The following table provides a list of Ceph subsystems and their default log and

View File

@ -77,9 +77,11 @@ public:
// NOTE: depend on magic value in _ASSERT_H so that we detect when
// /usr/include/assert.h clobbers our fancier version.
#define dendl std::flush; \
#define dendl_impl std::flush; \
_ASSERT_H->_log->submit_entry(_dout_e); \
} \
} while (0)
#define dendl dendl_impl
#endif

View File

@ -47,8 +47,6 @@
#define dout_subsys ceph_subsys_mds
#undef dout_prefix
#undef DOUT_COND
#define DOUT_COND(cct, l) l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_locker
#define dout_context g_ceph_context
#define dout_prefix _prefix(_dout, mds)
static ostream& _prefix(std::ostream *_dout, MDSRank *mds) {

View File

@ -41,10 +41,19 @@ using std::vector;
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_mds
#undef DOUT_COND
#define DOUT_COND(cct, l) l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_balancer
#undef dout_prefix
#define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".bal "
#undef dout
#define dout(lvl) \
do {\
auto subsys = ceph_subsys_mds;\
if ((dout_context)->_conf->subsys.should_gather(ceph_subsys_mds_balancer, lvl)) {\
subsys = ceph_subsys_mds_balancer;\
}\
dout_impl(dout_context, subsys, lvl) dout_prefix
#undef dendl
#define dendl dendl_impl; } while (0)
#define MIN_LOAD 50 // ??
#define MIN_REEXPORT 5 // will automatically reexport
@ -61,7 +70,7 @@ int MDBalancer::proc_message(Message *m)
break;
default:
derr << " balancer unknown message " << m->get_type() << dendl;
dout(0) << " balancer unknown message " << m->get_type() << dendl;
assert(0 == "balancer unknown message");
}
@ -205,7 +214,7 @@ mds_load_t MDBalancer::get_load(utime_t now)
if (cpu.is_open())
cpu >> load.cpu_load_avg;
else
derr << "input file " PROCPREFIX "'/proc/loadavg' not found" << dendl;
dout(0) << "input file " PROCPREFIX "'/proc/loadavg' not found" << dendl;
dout(15) << "get_load " << load << dendl;
return load;

View File

@ -33,8 +33,6 @@
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_mds
#undef DOUT_COND
#define DOUT_COND(cct, l) l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_log
#undef dout_prefix
#define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".log "

View File

@ -78,8 +78,6 @@
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_mds
#undef DOUT_COND
#define DOUT_COND(cct, l) (l <= cct->_conf->debug_mds || l <= cct->_conf->debug_mds_migrator)
#undef dout_prefix
#define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".migrator "

View File

@ -54,9 +54,6 @@
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_mds
#undef DOUT_COND
#define DOUT_COND(cct, l) (l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_log \
|| l <= cct->_conf->debug_mds_log_expire)
#undef dout_prefix
#define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".journal "
@ -298,9 +295,6 @@ void LogSegment::try_to_expire(MDSRank *mds, MDSGatherBuilder &gather_bld, int o
}
}
#undef DOUT_COND
#define DOUT_COND(cct, l) (l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_log)
// -----------------------
// EMetaBlob