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 <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 473 (Trace misreporting pre/post attributes for setattr.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=473
This commit is contained in:
Shehjar Tikoo 2010-02-25 15:37:58 +00:00 committed by Anand V. Avati
parent e180e55a99
commit 8a7b7b09c9

View File

@ -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);