summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-10-12 22:23:17 +0530
committerAmar Tumballi <amarts@redhat.com>2018-10-29 08:56:46 +0000
commit0f817c7795f115fb67b0973ce0965bcd3de8d196 (patch)
treed475c5b66fac954e4ad3524924b7cea838362409 /xlators/protocol/server
parentff18121945bff394f3234e9f1a9d61ac97d4d493 (diff)
server-protocol: set the frame type to TYPE_FOP
This will allow proper printing of exact 'fop' type to be logged in string, not number, during backtraces. Considering this was not done on brick processes, we have no easy way to glance and understand which fops were pending. What gets changed: After a crash, most of the core-dumps logged were of the form: ``` pending frames: frame : type(0) op(18) frame : type(0) op(18) frame : type(0) op(28) ``` would change to ``` pending frames: frame : type(1) op(SETXATTR) frame : type(1) op(SETXATTR) frame : type(1) op(READDIR) ``` updates: bz#1639599 Change-Id: I0e3d2a8dee9cfde7ed0112a948f5213f546efb80 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/protocol/server')
-rw-r--r--xlators/protocol/server/src/server-helpers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index e346c5b22da..18dc7cb169d 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -310,6 +310,7 @@ do_fd_cleanup(xlator_t *this, client_t *client, fdentry_t *fdentries,
goto out;
}
+ tmp_frame->root->type = GF_OP_TYPE_FOP;
GF_ASSERT(fd->inode);
ret = inode_path(fd->inode, NULL, &path);
@@ -444,6 +445,7 @@ server_alloc_frame(rpcsvc_request_t *req)
if (!frame)
goto out;
+ frame->root->type = GF_OP_TYPE_FOP;
state = GF_CALLOC(1, sizeof(*state), gf_server_mt_state_t);
if (!state)
goto out;