MCPcopy Create free account
hub / github.com/ceph/ceph / get_pool_stats_

Method get_pool_stats_

src/osdc/Objecter.cc:4645–4671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4643// pool stats
4644
4645void Objecter::get_pool_stats_(
4646 const std::vector<std::string>& pools,
4647 decltype(PoolStatOp::onfinish)&& onfinish)
4648{
4649 ldout(cct, 10) << "get_pool_stats " << pools << dendl;
4650
4651 auto op = new PoolStatOp;
4652 op->tid = ++last_tid;
4653 op->pools = pools;
4654 op->onfinish = std::move(onfinish);
4655 if (mon_timeout > timespan(0)) {
4656 op->ontimeout = timer.add_event(mon_timeout,
4657 [this, op]() {
4658 pool_stat_op_cancel(op->tid,
4659 -ETIMEDOUT); });
4660 } else {
4661 op->ontimeout = 0;
4662 }
4663
4664 unique_lock wl(rwlock);
4665
4666 poolstat_ops[op->tid] = op;
4667
4668 logger->set(l_osdc_poolstat_active, poolstat_ops.size());
4669
4670 _poolstat_submit(op);
4671}
4672
4673void Objecter::_poolstat_submit(PoolStatOp *op)
4674{

Callers

nothing calls this directly

Calls 3

add_eventMethod · 0.45
setMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected