summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client3_1-fops.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2012-05-15 16:31:55 +0530
committerAnand Avati <avati@redhat.com>2012-05-17 09:19:32 -0700
commit99ac60193a31438258b751e4c99c85d153ddaae5 (patch)
tree197c2b50c72748b76e48a429d7cc9f421fb9fdfa /xlators/protocol/client/src/client3_1-fops.c
parentab12e305fcd303972c17e8b9e777cc1482aadf37 (diff)
client/protocol : Changes in client3_1_getxattr()
Backporting change 1d02db63ae from master. Copy args->loc to local->loc in client3_1_getxattr(). This prevents logs with "(null) (--)" in client3_1_getxattr_cbk(). Also save args->name in local->name and print it in the log as well. Also, fixes crashes caused by above patch in master. (trying to gf_strdup a NULL args->name) BUG: 812199 Change-Id: I5419f6a244de93dd1a96ac8e229be3ecdc9f456e Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3350 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client3_1-fops.c')
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index dcf688a0e9f..c4164a95b21 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -1051,11 +1051,12 @@ out:
if (rsp.op_ret == -1) {
gf_log (this->name, ((op_errno == ENOTSUP) ?
GF_LOG_DEBUG : GF_LOG_WARNING),
- "remote operation failed: %s. Path: %s (%s)",
+ "remote operation failed: %s. Path: %s (%s). Key: %s",
strerror (op_errno),
(local) ? local->loc.path : "--",
(local && local->loc.inode) ?
- uuid_utoa (local->loc.inode->gfid) : "--");
+ uuid_utoa (local->loc.inode->gfid) : "--",
+ (local) ? local->name : "(null)");
}
CLIENT_STACK_UNWIND (getxattr, frame, rsp.op_ret, op_errno, dict, xdata);
@@ -4635,6 +4636,10 @@ client3_1_getxattr (call_frame_t *frame, xlator_t *this,
op_errno = ENOMEM;
goto unwind;
}
+
+ loc_copy (&local->loc, args->loc);
+ if (args->name)
+ local->name = gf_strdup (args->name);
frame->local = local;
rsp_iobref = iobref_new ();