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

Method ready

src/msg/async/ProtocolV1.cc:475–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

473}
474
475CtPtr ProtocolV1::ready() {
476 ldout(cct, 25) << __func__ << dendl;
477
478 // make sure no pending tick timer
479 if (connection->last_tick_id) {
480 connection->center->delete_time_event(connection->last_tick_id);
481 }
482 connection->last_tick_id = connection->center->create_time_event(
483 connection->inactive_timeout_us, connection->tick_handler);
484
485 connection->write_lock.lock();
486 can_write = WriteStatus::CANWRITE;
487 if (is_queued()) {
488 connection->center->dispatch_event_external(connection->write_handler);
489 }
490 connection->write_lock.unlock();
491 connection->maybe_start_delay_thread();
492
493 state = OPENED;
494 return wait_message();
495}
496
497CtPtr ProtocolV1::wait_message() {
498 if (state != OPENED) { // must have changed due to a replace

Callers 2

client_readyMethod · 0.45
server_readyMethod · 0.45

Calls 6

delete_time_eventMethod · 0.80
create_time_eventMethod · 0.80
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected