Use a separate osd_client_t::in_osd_num for inbound OSD connections

This commit is contained in:
Vitaliy Filippov
2025-06-05 02:09:41 +03:00
parent f390e73dae
commit cd028612c8
4 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -188,7 +188,7 @@ void osd_messenger_t::init()
auto cl = cl_it->second;
cl_it++;
auto peer_fd = cl->peer_fd;
if (!cl->osd_num || cl->peer_state != PEER_CONNECTED && cl->peer_state != PEER_RDMA)
if (!cl->osd_num && !cl->in_osd_num || cl->peer_state != PEER_CONNECTED && cl->peer_state != PEER_RDMA)
{
// Do not run keepalive on regular clients
continue;
+1
View File
@@ -60,6 +60,7 @@ struct osd_client_t
int ping_time_remaining = 0;
int idle_time_remaining = 0;
osd_num_t osd_num = 0;
osd_num_t in_osd_num = 0;
bool is_incoming = false;
void *in_buf = NULL;
+1 -2
View File
@@ -510,13 +510,12 @@ void osd_messenger_t::rdmacm_established(rdma_cm_event *ev)
rc->qp = conn->cmid->qp;
// And an osd_client_t
auto cl = new osd_client_t();
cl->is_incoming = true;
cl->peer_addr = conn->parsed_addr;
cl->peer_port = conn->rdmacm_port;
cl->peer_fd = conn->peer_fd;
cl->peer_state = PEER_RDMA;
cl->connect_timeout_id = -1;
cl->osd_num = peer_osd;
cl->in_osd_num = peer_osd;
cl->in_buf = malloc_or_die(receive_buffer_size);
cl->rdma_conn = rc;
clients[conn->peer_fd] = cl;