From 2eb4a5b86596fbcbb1c0baa9f1b7de0843896dd9 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 22 May 2012 17:21:20 +0530 Subject: protocol/client: do not print the null gfid when symlink fails Change-Id: I1a2748768bc30a00c4f7b2e2fda1d282bc581658 BUG: 823880 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.com/3411 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/protocol/client/src/client3_1-fops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xlators/protocol/client/src') diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index 07d55c895..061bfcd7e 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -179,12 +179,14 @@ client3_1_symlink_cbk (struct rpc_req *req, struct iovec *iov, int count, out: if (rsp.op_ret == -1) { + /* no need to print the gfid, because it will be null, since + * symlink operation failed. + */ gf_log (this->name, GF_LOG_WARNING, - "remote operation failed: %s. Path: %s (%s)", + "remote operation failed: %s. Path: (%s to %s)", strerror (gf_error_to_errno (rsp.op_errno)), (local) ? local->loc.path : "--", - (local && local->loc.inode) ? - uuid_utoa (local->loc.inode->gfid) : "--"); + (local) ? local->loc2.path: "--"); } CLIENT_STACK_UNWIND (symlink, frame, rsp.op_ret, @@ -3436,6 +3438,7 @@ client3_1_symlink (call_frame_t *frame, xlator_t *this, req.linkname = (char *)args->linkname; req.bname = (char *)args->loc->name; req.umask = args->umask; + local->loc2.path = gf_strdup (req.linkname); conf = this->private; -- cgit