From 8a7b7b09c96ab3f3f3426b0176cd0115f350e50f Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Thu, 25 Feb 2010 15:37:58 +0000 Subject: trace: Display op_errno even on successful readv ..this helps to show an op_errno that might contain an ENOENT sent from posix. Remember posix now sends and ENOENT even with an op_ret == 0 when reading encountered an end-of-file. Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 473 (Trace misreporting pre/post attributes for setattr.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=473 --- xlators/debug/trace/src/trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/debug') diff --git a/xlators/debug/trace/src/trace.c b/xlators/debug/trace/src/trace.c index 66a31dbd2..313f0f3cc 100644 --- a/xlators/debug/trace/src/trace.c +++ b/xlators/debug/trace/src/trace.c @@ -205,12 +205,12 @@ trace_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this, strftime (ctime_buf, 256, "[%b %d %H:%M:%S]", localtime (&buf->st_ctime)); gf_log (this->name, GF_LOG_NORMAL, - "%"PRId64": (op_ret=%d, *buf {st_dev=%"GF_PRI_DEV", " + "%"PRId64": (op_ret=%d, op_errno=%d, *buf {st_dev=%"GF_PRI_DEV", " "st_ino=%"PRIu64", st_mode=%o, st_nlink=%"GF_PRI_NLINK", " "st_uid=%d, st_gid=%d, st_rdev=%"GF_PRI_DEV", " "st_size=%"PRId64", st_blksize=%"GF_PRI_BLKSIZE", " "st_blocks=%"PRId64", st_atime=%s, st_mtime=%s, st_ctime=%s})", - frame->root->unique, op_ret, buf->st_dev, buf->st_ino, + frame->root->unique, op_ret, op_errno, buf->st_dev, buf->st_ino, buf->st_mode, buf->st_nlink, buf->st_uid, buf->st_gid, buf->st_rdev, buf->st_size, buf->st_blksize, buf->st_blocks, atime_buf, mtime_buf, ctime_buf); -- cgit