From 12d1c993660d6ae93b0fd08de9a6d7bb7431e7b0 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Wed, 11 May 2016 16:39:59 +0530 Subject: mount/fuse: Log gfid and fd ptr as well when writev/readv fail Change-Id: Iaed3850171155f2452fc29ebecd350c2da0b55cb BUG: 1335091 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/14291 NetBSD-regression: NetBSD Build System Smoke: Gluster Build System Reviewed-by: Pranith Kumar Karampuri CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- xlators/mount/fuse/src/fuse-bridge.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'xlators/mount') diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index ee93aa3291f..c8e7c35ce17 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -2221,8 +2221,11 @@ fuse_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this, send_fuse_err (this, finh, ENOMEM); } else { gf_log ("glusterfs-fuse", GF_LOG_WARNING, - "%"PRIu64": READ => %d (%s)", frame->root->unique, - op_ret, strerror (op_errno)); + "%"PRIu64": READ => %d gfid=%s fd=%p (%s)", + frame->root->unique, op_ret, + (state->fd && state->fd->inode) ? + uuid_utoa (state->fd->inode->gfid) : "nil", + state->fd, strerror (op_errno)); send_fuse_err (this, finh, op_errno); } @@ -2302,7 +2305,10 @@ fuse_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, send_fuse_obj (this, finh, &fwo); } else { gf_log ("glusterfs-fuse", GF_LOG_WARNING, - "%"PRIu64": WRITE => -1 (%s)", frame->root->unique, + "%"PRIu64": WRITE => -1 gfid=%s fd=%p (%s)", + frame->root->unique, + (state->fd && state->fd->inode) ? + uuid_utoa (state->fd->inode->gfid) : "nil", state->fd, strerror (op_errno)); send_fuse_err (this, finh, op_errno); -- cgit