summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-04-11 11:51:31 +0530
committerAnand Avati <avati@redhat.com>2012-04-11 10:09:58 -0700
commitdde9cfcaf3016968fade7591ddfc1c95851e9e59 (patch)
tree5d1ee830156de38f5ace45cc8daf0975b80a7601 /xlators/protocol
parent0bfadb56d0ce0ffaa410eccb2a9d9eaaf6f3ab7c (diff)
protocol/client: in link_cbk() try to print valid information in case of error
currently there is a chance we don't have a source 'loc_t' path information instead we would have gfid. Need to print destination information too. Change-Id: I7a5edbdc9abe18fdb330fc7ed49c9946cf7fe382 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 810146 Reviewed-on: http://review.gluster.com/3122 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index 2cfa201ce65..35e90c72379 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -2433,9 +2433,12 @@ client3_1_link_cbk (struct rpc_req *req, struct iovec *iov, int count,
out:
if (rsp.op_ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "remote operation failed: %s. Path: %s",
+ "remote operation failed: %s (%s -> %s)",
strerror (gf_error_to_errno (rsp.op_errno)),
- (local) ? local->loc.path : "--");
+ (local) ? ((local->loc.path)? local->loc.path :
+ uuid_utoa (local->loc.inode->gfid)) : "--",
+ (local) ? ((local->loc2.path)? local->loc2.path :
+ local->loc2.name) : "--");
}
CLIENT_STACK_UNWIND (link, frame, rsp.op_ret,
@@ -3549,6 +3552,7 @@ client3_1_link (call_frame_t *frame, xlator_t *this,
}
loc_copy (&local->loc, args->oldloc);
+ loc_copy (&local->loc2, args->newloc);
frame->local = local;
req.newbname = (char *)args->newloc->name;