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

Method handle_command_reply

src/mon/MonClient.cc:1382–1407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1380}
1381
1382void MonClient::handle_command_reply(MCommandReply *reply)
1383{
1384 MonCommand *r = NULL;
1385 uint64_t tid = reply->get_tid();
1386
1387 if (tid == 0 && !mon_commands.empty()) {
1388 r = mon_commands.begin()->second;
1389 ldout(cct, 10) << __func__ << " has tid 0, assuming it is " << r->tid
1390 << dendl;
1391 } else {
1392 auto p = mon_commands.find(tid);
1393 if (p == mon_commands.end()) {
1394 ldout(cct, 10) << __func__ << " " << reply->get_tid() << " not found"
1395 << dendl;
1396 reply->put();
1397 return;
1398 }
1399 r = p->second;
1400 }
1401
1402 ldout(cct, 10) << __func__ << " " << r->tid << " " << r->cmd << dendl;
1403 auto ec = reply->r < 0 ? bs::error_code(-reply->r, mon_category())
1404 : bs::error_code();
1405 _finish_command(r, ec, reply->rs, std::move(reply->get_data()));
1406 reply->put();
1407}
1408
1409class MonClient::ContextVerter {
1410 std::string* outs;

Callers

nothing calls this directly

Calls 8

error_codeClass · 0.50
get_tidMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
findMethod · 0.45
endMethod · 0.45
putMethod · 0.45
get_dataMethod · 0.45

Tested by

no test coverage detected