From a9d3d0438ef93beb6ec3f895923db4418c0ab3df Mon Sep 17 00:00:00 2001 From: AnkitRaj Date: Mon, 29 May 2017 14:12:21 +0530 Subject: dht: for many operation directory/file path is (null) in brick log There are few operations on mount point which results to (null) error for path on brick log. This should be corrected with correct path. Change-Id: I5acf2ead5196594c76a2e526aafbfc128ece433e BUG: 1456361 Signed-off-by: ankitraj Reviewed-on: https://review.gluster.org/17407 Smoke: Gluster Build System Tested-by: ankitraj NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- xlators/protocol/server/src/server-rpc-fops.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'xlators/protocol/server/src') diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index 3b7f4e61f11..4e71715bf8e 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -427,7 +427,8 @@ server_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this, op_errno, PS_MSG_ACCESS_INFO, "%"PRId64": ACCESS %s (%s), client: %s, " "error-xlator: %s", frame->root->unique, - state->loc.path, uuid_utoa (state->resolve.gfid), + (state->loc.path) ? state->loc.path : "", + uuid_utoa (state->resolve.gfid), STACK_CLIENT_NAME (frame->root), STACK_ERR_XL_NAME (frame->root)); goto out; @@ -1106,7 +1107,8 @@ server_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret < 0) { gf_msg (this->name, GF_LOG_INFO, op_errno, PS_MSG_LINK_INFO, "%"PRId64": SYMLINK %s (%s/%s), client: %s, " - "error-xlator:%s", frame->root->unique, state->loc.path, + "error-xlator:%s", frame->root->unique, + (state->loc.path) ? state->loc.path : "", uuid_utoa (state->resolve.pargfid), state->resolve.bname, STACK_CLIENT_NAME (frame->root), @@ -1650,7 +1652,8 @@ server_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, gf_msg (this->name, fop_log_level (GF_FOP_STAT, op_errno), op_errno, PS_MSG_STAT_INFO, "%"PRId64": STAT %s (%s), client: %s, error-xlator: %s", - frame->root->unique, state->loc.path, + frame->root->unique, + (state->loc.path) ? state->loc.path : "", uuid_utoa (state->resolve.gfid), STACK_CLIENT_NAME (frame->root), STACK_ERR_XL_NAME (frame->root)); @@ -1689,7 +1692,8 @@ server_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, gf_msg (this->name, GF_LOG_INFO, op_errno, PS_MSG_SETATTR_INFO, "%"PRId64": SETATTR %s (%s), client: %s, " "error-xlator: %s", frame->root->unique, - state->loc.path, uuid_utoa (state->resolve.gfid), + (state->loc.path) ? state->loc.path : "", + uuid_utoa (state->resolve.gfid), STACK_CLIENT_NAME (frame->root), STACK_ERR_XL_NAME (frame->root)); goto out; -- cgit