summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/rpc-lib-messages.h4
-rw-r--r--rpc/rpc-transport/rdma/src/name.c15
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c11
3 files changed, 18 insertions, 12 deletions
diff --git a/rpc/rpc-lib/src/rpc-lib-messages.h b/rpc/rpc-lib/src/rpc-lib-messages.h
index 51351e82283..6619a171314 100644
--- a/rpc/rpc-lib/src/rpc-lib-messages.h
+++ b/rpc/rpc-lib/src/rpc-lib-messages.h
@@ -41,7 +41,7 @@
*/
#define GLFS_RPC_LIB_BASE GLFS_MSGID_COMP_RPC_LIB
-#define GLFS_NUM_MESSAGES 12
+#define GLFS_NUM_MESSAGES 13
#define GLFS_RPC_LIB_MSGID_END (GLFS_RPC_LIB_BASE + GLFS_NUM_MESSAGES + 1)
/* Messages with message IDs */
@@ -75,6 +75,8 @@
#define TRANS_MSG_TIMEOUT_EXCEEDED (GLFS_RPC_LIB_BASE + 12)
+#define TRANS_MSG_SOCKET_BIND_ERROR (GLFS_RPC_LIB_BASE + 13)
+
/*------------*/
#define glfs_msg_end_x GLFS_RPC_LIB_MSGID_END, "Invalid: End of messages"
diff --git a/rpc/rpc-transport/rdma/src/name.c b/rpc/rpc-transport/rdma/src/name.c
index f723efc2360..0bbbbc0bede 100644
--- a/rpc/rpc-transport/rdma/src/name.c
+++ b/rpc/rpc-transport/rdma/src/name.c
@@ -101,10 +101,10 @@ af_unix_client_bind (rpc_transport_t *this, struct sockaddr *sockaddr,
if (path_data) {
char *path = data_to_str (path_data);
if (!path || strlen (path) > UNIX_PATH_MAX) {
- gf_log (this->name, GF_LOG_DEBUG,
- "transport.rdma.bind-path not specified "
- "for unix socket, letting connect to assign "
- "default value");
+ gf_msg_debug (this->name, 0,
+ "transport.rdma.bind-path not specified "
+ "for unix socket, letting connect to "
+ "assign default value");
goto err;
}
@@ -112,9 +112,10 @@ af_unix_client_bind (rpc_transport_t *this, struct sockaddr *sockaddr,
strcpy (addr->sun_path, path);
ret = bind (sock, (struct sockaddr *)addr, sockaddr_len);
if (ret == -1) {
- gf_log (this->name, GF_LOG_ERROR,
- "cannot bind to unix-domain socket %d (%s)",
- sock, strerror (errno));
+ gf_msg (this->name, GF_LOG_ERROR, errno,
+ TRANS_MSG_SOCKET_BIND_ERROR,
+ "cannot bind to unix-domain socket %d ",
+ sock);
goto err;
}
}
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index 630a6601387..25eef7b97ee 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -377,7 +377,8 @@ gf_rdma_deregister_iobuf_pool (gf_rdma_device_t *device)
list_for_each_entry_safe (arena_mr, tmp,
&device->all_mr, list) {
if (ibv_dereg_mr(arena_mr->mr)) {
- gf_log ("rdma", GF_LOG_WARNING,
+ gf_msg ("rdma", GF_LOG_WARNING, 0,
+ RDMA_MSG_DEREGISTER_ARENA_FAILED,
"deallocation of memory region "
"failed");
return;
@@ -1662,7 +1663,7 @@ __gf_rdma_create_write_chunks (gf_rdma_peer_t *peer, gf_rdma_ioq_t *entry,
if ((chunk_type == gf_rdma_writech)
&& ((entry->msg.request.rsphdr_count == 0)
|| (entry->msg.request.rsphdr_vec[0].iov_base == NULL))) {
- gf_log (GF_RDMA_LOG_NAME, GF_LOG_DEBUG,
+ gf_msg_debug (GF_RDMA_LOG_NAME, 0,
"vector specifying buffer to hold the program's reply "
"header should also be provided when buffers are "
"provided for holding the program's payload in reply");
@@ -2761,7 +2762,8 @@ __gf_rdma_ioq_churn_entry (gf_rdma_peer_t *peer, gf_rdma_ioq_t *entry)
if (post == NULL) {
ret = -1;
- gf_log_callingfn (GF_RDMA_LOG_NAME, GF_LOG_WARNING,
+ gf_msg_callingfn (GF_RDMA_LOG_NAME, GF_LOG_WARNING, 0,
+ RDMA_MSG_POST_SEND_FAILED,
"not able to get a post to send msg");
goto out;
}
@@ -4664,7 +4666,8 @@ gf_rdma_disconnect (rpc_transport_t *this)
int32_t ret = 0;
priv = this->private;
- gf_log_callingfn (this->name, GF_LOG_DEBUG,
+ gf_msg_callingfn (this->name, GF_LOG_DEBUG, 0,
+ RDMA_MSG_PEER_DISCONNECTED,
"disconnect called (peer:%s)",
this->peerinfo.identifier);