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

Method submit_command

src/osdc/Objecter.cc:5275–5309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5273{}
5274
5275void Objecter::submit_command(CommandOp *c, ceph_tid_t *ptid)
5276{
5277 shunique_lock sul(rwlock, ceph::acquire_unique);
5278
5279 ceph_tid_t tid = ++last_tid;
5280 ldout(cct, 10) << "_submit_command " << tid << " " << c->cmd << dendl;
5281 c->tid = tid;
5282
5283 {
5284 unique_lock hs_wl(homeless_session->lock);
5285 _session_command_op_assign(homeless_session, c);
5286 }
5287
5288 _calc_command_target(c, sul);
5289 _assign_command_session(c, sul);
5290 if (osd_timeout > timespan(0)) {
5291 c->ontimeout = timer.add_event(osd_timeout,
5292 [this, c, tid]() {
5293 command_op_cancel(
5294 c->session, tid,
5295 osdc_errc::timed_out); });
5296 }
5297
5298 if (!c->session->is_homeless()) {
5299 _send_command(c);
5300 } else {
5301 _maybe_request_map();
5302 }
5303 if (c->map_check_error)
5304 _send_command_map_check(c);
5305 if (ptid)
5306 *ptid = tid;
5307
5308 logger->inc(l_osdc_command_active);
5309}
5310
5311int Objecter::_calc_command_target(CommandOp *c,
5312 shunique_lock<ceph::shared_mutex>& sul)

Callers

nothing calls this directly

Calls 3

is_homelessMethod · 0.80
add_eventMethod · 0.45
incMethod · 0.45

Tested by

no test coverage detected