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

Method client_ready

src/msg/async/ProtocolV1.cc:1798–1839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1796}
1797
1798CtPtr ProtocolV1::client_ready() {
1799 ldout(cct, 20) << __func__ << dendl;
1800
1801 // hooray!
1802 peer_global_seq = connect_reply.global_seq;
1803 connection->policy.lossy = connect_reply.flags & CEPH_MSG_CONNECT_LOSSY;
1804
1805 once_ready = true;
1806 connect_seq += 1;
1807 ceph_assert(connect_seq == connect_reply.connect_seq);
1808 backoff = utime_t();
1809 connection->set_features((uint64_t)connect_reply.features &
1810 (uint64_t)connection->policy.features_supported);
1811 ldout(cct, 10) << __func__ << " connect success " << connect_seq
1812 << ", lossy = " << connection->policy.lossy << ", features "
1813 << connection->get_features() << dendl;
1814
1815 // If we have an authorizer, get a new AuthSessionHandler to deal with
1816 // ongoing security of the connection. PLR
1817 if (auth_meta->authorizer) {
1818 ldout(cct, 10) << __func__ << " setting up session_security with auth "
1819 << auth_meta->authorizer.get() << dendl;
1820 session_security.reset(get_auth_session_handler(
1821 cct, auth_meta->authorizer->protocol,
1822 auth_meta->session_key,
1823 connection->get_features()));
1824 } else {
1825 // We have no authorizer, so we shouldn't be applying security to messages
1826 // in this AsyncConnection. PLR
1827 ldout(cct, 10) << __func__ << " no authorizer, clearing session_security"
1828 << dendl;
1829 session_security.reset();
1830 }
1831
1832 if (connection->delay_state) {
1833 ceph_assert(connection->delay_state->ready());
1834 }
1835 connection->dispatch_queue->queue_connect(connection);
1836 messenger->ms_deliver_handle_fast_connect(connection);
1837
1838 return ready();
1839}
1840
1841/**
1842 * Server Protocol V1

Callers

nothing calls this directly

Calls 10

get_auth_session_handlerFunction · 0.85
readyFunction · 0.85
queue_connectMethod · 0.80
utime_tClass · 0.50
set_featuresMethod · 0.45
get_featuresMethod · 0.45
getMethod · 0.45
resetMethod · 0.45
readyMethod · 0.45

Tested by

no test coverage detected