summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib
diff options
context:
space:
mode:
authorMilind Changire <mchangir@redhat.com>2018-08-30 09:47:18 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-08-30 13:03:40 +0000
commit459ea3e78136ee74b71ae00b448245de7148cdfe (patch)
treeabefab9740eef633e28764ebf5d284f24f3c5d78 /rpc/rpc-lib
parenta38f9cb7a6c9a25ceef9a0638add39dfd2b0c0d9 (diff)
rpc: log fuse unique ID along with gluster XID
for better traceability between fuse requests and gluster requests a mapping needs to be established in the logs between the two IDs BUG: 1623408 Change-Id: I0ef82fe69c1ad7d0ce9e3ac4f35cd82aa6e9bca9 fixes: bz#1623408 Signed-off-by: Milind Changire <mchangir@redhat.com>
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index 232101c301e..5e1d41311d0 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -174,14 +174,15 @@ call_bail (void *data)
".%"GF_PRI_SUSECONDS, trav->saved_at.tv_usec);
gf_log (conn->name, GF_LOG_ERROR,
- "bailing out frame type(%s) op(%s(%d)) xid = 0x%x "
- "sent = %s. timeout = %d for %s",
+ "bailing out frame type(%s), op(%s(%d)), xid = 0x%x, "
+ "unique = %"PRIu64", sent = %s, timeout = %d for %s",
trav->rpcreq->prog->progname,
(trav->rpcreq->prog->procnames) ?
trav->rpcreq->prog->procnames[trav->rpcreq->procnum] :
"--",
- trav->rpcreq->procnum, trav->rpcreq->xid, frame_sent,
- conn->frame_timeout, peerid);
+ trav->rpcreq->procnum, trav->rpcreq->xid,
+ ((call_frame_t *)(trav->frame))->root->unique,
+ frame_sent, conn->frame_timeout, peerid);
clnt = rpc_clnt_ref (clnt);
trav->rpcreq->rpc_status = -1;
@@ -1644,6 +1645,7 @@ rpc_clnt_submit (struct rpc_clnt *rpc, rpc_clnt_prog_t *prog,
char new_iobref = 0;
uint64_t callid = 0;
gf_boolean_t need_unref = _gf_false;
+ call_frame_t *cframe = frame;
if (!rpc || !prog || !frame) {
goto out;
@@ -1726,8 +1728,9 @@ rpc_clnt_submit (struct rpc_clnt *rpc, rpc_clnt_prog_t *prog,
if (ret == -1) {
gf_log (conn->name, GF_LOG_WARNING,
"failed to submit rpc-request "
- "(XID: 0x%x Program: %s, ProgVers: %d, "
- "Proc: %d) to rpc-transport (%s)", rpcreq->xid,
+ "(unique: %"PRIu64", XID: 0x%x Program: %s, "
+ "ProgVers: %d, Proc: %d) to rpc-transport (%s)",
+ cframe->root->unique, rpcreq->xid,
rpcreq->prog->progname, rpcreq->prog->progver,
rpcreq->procnum, conn->name);
}
@@ -1746,8 +1749,9 @@ rpc_clnt_submit (struct rpc_clnt *rpc, rpc_clnt_prog_t *prog,
conn->msgcnt++;
gf_log ("rpc-clnt", GF_LOG_TRACE, "submitted request "
- "(XID: 0x%x Program: %s, ProgVers: %d, "
- "Proc: %d) to rpc-transport (%s)", rpcreq->xid,
+ "(unique: %"PRIu64", XID: 0x%x, Program: %s, "
+ "ProgVers: %d, Proc: %d) to rpc-transport (%s)",
+ cframe->root->unique, rpcreq->xid,
rpcreq->prog->progname, rpcreq->prog->progver,
rpcreq->procnum, conn->name);
}