OPTION(keyring, OPT_STR, "/etc/ceph/$cluster.$name.keyring,/etc/ceph/$cluster.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin")
OPTION(heartbeat_interval, OPT_INT, 5)
OPTION(heartbeat_file, OPT_STR, "")
+OPTION(perf, OPT_BOOL, true) // enable internal perf counters
+
OPTION(ms_tcp_nodelay, OPT_BOOL, true)
OPTION(ms_initial_backoff, OPT_DOUBLE, .2)
OPTION(ms_max_backoff, OPT_DOUBLE, 15.0)
OPTION(ms_rwthread_stack_bytes, OPT_U64, 1024 << 10)
OPTION(ms_tcp_read_timeout, OPT_U64, 900)
OPTION(ms_inject_socket_failures, OPT_U64, 0)
+
OPTION(mon_data, OPT_STR, "/var/lib/ceph/mon/$cluster-$id")
OPTION(mon_initial_members, OPT_STR, "") // list of initial cluster mon ids; if specified, need majority to form initial quorum and create new cluster
OPTION(mon_sync_fs_threshold, OPT_INT, 5) // sync() when writing this many objects; 0 to disable.
void PerfCounters::inc(int idx, uint64_t amt)
{
+ if (!m_cct->_conf->perf)
+ return;
+
Mutex::Locker lck(m_lock);
assert(idx > m_lower_bound);
assert(idx < m_upper_bound);
void PerfCounters::dec(int idx, uint64_t amt)
{
+ if (!m_cct->_conf->perf)
+ return;
+
Mutex::Locker lck(m_lock);
assert(idx > m_lower_bound);
assert(idx < m_upper_bound);
void PerfCounters::set(int idx, uint64_t amt)
{
+ if (!m_cct->_conf->perf)
+ return;
+
Mutex::Locker lck(m_lock);
assert(idx > m_lower_bound);
assert(idx < m_upper_bound);
uint64_t PerfCounters::get(int idx) const
{
+ if (!m_cct->_conf->perf)
+ return 0;
+
Mutex::Locker lck(m_lock);
assert(idx > m_lower_bound);
assert(idx < m_upper_bound);
void PerfCounters::finc(int idx, double amt)
{
+ if (!m_cct->_conf->perf)
+ return;
+
Mutex::Locker lck(m_lock);
assert(idx > m_lower_bound);
assert(idx < m_upper_bound);
void PerfCounters::fset(int idx, double amt)
{
+ if (!m_cct->_conf->perf)
+ return;
+
Mutex::Locker lck(m_lock);
assert(idx > m_lower_bound);
assert(idx < m_upper_bound);
double PerfCounters::fget(int idx) const
{
+ if (!m_cct->_conf->perf)
+ return 0.0;
+
Mutex::Locker lck(m_lock);
assert(idx > m_lower_bound);
assert(idx < m_upper_bound);