diff options
author | Anuradha Talur <atalur@redhat.com> | 2013-08-28 14:29:50 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-09-03 06:50:40 -0700 |
commit | 7dbfbfd3694e02b90e8f3ce509f5279da1523a02 (patch) | |
tree | 3225b7919c709bbcb1fdae551f5d47d508f97332 /xlators/protocol | |
parent | f8e968a49468fdea5503423c2c9c4be82c76ad6f (diff) |
features/locks : Improves debuggability of inode/entry locks.
Prints, in the statedump, the information about the mount that
performed the inode/entry lk.
For the entrylks that are granted after a blocked state, the
blocked time is not printed. A patch for that will be sent
later.
Change-Id: Ib0c1ed21fa9328b435f96b590dd343f59814a08d
BUG: 915629
Signed-off-by: Anuradha Talur <atalur@redhat.com>
Reviewed-on: http://review.gluster.org/5712
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/server/src/server-rpc-fops.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index 9a0c777e5e7..f0a896131f9 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -2206,6 +2206,7 @@ err: int server_fentrylk_resume (call_frame_t *frame, xlator_t *bound_xl) { + GF_UNUSED int ret = -1; server_state_t *state = NULL; state = CALL_STATE (frame); @@ -2213,6 +2214,13 @@ server_fentrylk_resume (call_frame_t *frame, xlator_t *bound_xl) if (state->resolve.op_ret != 0) goto err; + if (!state->xdata) + state->xdata = dict_new (); + + if (state->xdata) + ret = dict_set_str (state->xdata, "connection-id", + state->client->server_ctx.client_uid); + STACK_WIND (frame, server_fentrylk_cbk, bound_xl, bound_xl->fops->fentrylk, state->volume, state->fd, state->name, @@ -2229,6 +2237,7 @@ err: int server_entrylk_resume (call_frame_t *frame, xlator_t *bound_xl) { + GF_UNUSED int ret = -1; server_state_t *state = NULL; state = CALL_STATE (frame); @@ -2236,6 +2245,13 @@ server_entrylk_resume (call_frame_t *frame, xlator_t *bound_xl) if (state->resolve.op_ret != 0) goto err; + if (!state->xdata) + state->xdata = dict_new (); + + if (state->xdata) + ret = dict_set_str (state->xdata, "connection-id", + state->client->server_ctx.client_uid); + STACK_WIND (frame, server_entrylk_cbk, bound_xl, bound_xl->fops->entrylk, state->volume, &state->loc, state->name, @@ -2251,6 +2267,7 @@ err: int server_finodelk_resume (call_frame_t *frame, xlator_t *bound_xl) { + GF_UNUSED int ret = -1; server_state_t *state = NULL; state = CALL_STATE (frame); @@ -2258,6 +2275,13 @@ server_finodelk_resume (call_frame_t *frame, xlator_t *bound_xl) if (state->resolve.op_ret != 0) goto err; + if (!state->xdata) + state->xdata = dict_new (); + + if (state->xdata) + ret = dict_set_str (state->xdata, "connection-id", + state->client->server_ctx.client_uid); + STACK_WIND (frame, server_finodelk_cbk, bound_xl, bound_xl->fops->finodelk, state->volume, state->fd, state->cmd, &state->flock, state->xdata); @@ -2273,6 +2297,7 @@ err: int server_inodelk_resume (call_frame_t *frame, xlator_t *bound_xl) { + GF_UNUSED int ret = -1; server_state_t *state = NULL; state = CALL_STATE (frame); @@ -2280,6 +2305,13 @@ server_inodelk_resume (call_frame_t *frame, xlator_t *bound_xl) if (state->resolve.op_ret != 0) goto err; + if (!state->xdata) + state->xdata = dict_new (); + + if (state->xdata) + ret = dict_set_str (state->xdata, "connection-id", + state->client->server_ctx.client_uid); + STACK_WIND (frame, server_inodelk_cbk, bound_xl, bound_xl->fops->inodelk, state->volume, &state->loc, state->cmd, &state->flock, state->xdata); |