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>
This commit is contained in:
parent
ff18121945
commit
0f817c7795
@ -331,6 +331,7 @@ syncop_create_frame(xlator_t *this)
|
||||
if (!frame)
|
||||
return NULL;
|
||||
|
||||
frame->root->type = GF_OP_TYPE_FOP;
|
||||
opctx = syncopctx_getctx();
|
||||
|
||||
if (opctx && (opctx->valid & SYNCOPCTX_PID))
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user