Do not print RDMA connection messages when log_level=0

By the way, it's 1 by default in the OSD, so these messages will still be there in OSD logs
allow-etcd-address-option
Vitaliy Filippov 2021-05-01 00:25:18 +03:00
parent 4a7365660d
commit d3978c6d0e
2 changed files with 8 additions and 2 deletions

View File

@ -463,7 +463,10 @@ void osd_messenger_t::check_peer_config(osd_client_t *cl)
{
cl->rdma_conn->max_msg = server_max_msg;
}
printf("Connected to OSD %lu using RDMA\n", cl->osd_num);
if (log_level > 0)
{
printf("Connected to OSD %lu using RDMA\n", cl->osd_num);
}
cl->peer_state = PEER_RDMA;
tfd->set_fd_handler(cl->peer_fd, false, NULL);
// Add the initial receive request

View File

@ -272,7 +272,10 @@ void osd_messenger_t::handle_send(int result, osd_client_t *cl)
{
// FIXME: Do something better than just forgetting the FD
// FIXME: Ignore pings during RDMA state transition
printf("Successfully connected with client %d using RDMA\n", cl->peer_fd);
if (log_level > 0)
{
printf("Successfully connected with client %d using RDMA\n", cl->peer_fd);
}
cl->peer_state = PEER_RDMA;
tfd->set_fd_handler(cl->peer_fd, false, NULL);
// Add the initial receive request