From dde9cfcaf3016968fade7591ddfc1c95851e9e59 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 11 Apr 2012 11:51:31 +0530 Subject: 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 BUG: 810146 Reviewed-on: http://review.gluster.com/3122 Tested-by: Gluster Build System Reviewed-by: Shishir Gowda Reviewed-by: Raghavendra Bhat Reviewed-by: Anand Avati --- xlators/protocol/client/src/client3_1-fops.c | 8 ++++++-- 1 file 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; -- cgit