diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2016-05-09 16:53:19 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2016-06-08 12:34:15 -0700 |
commit | 9c6f0d0ad7a1212f451f3cc502da3329c3534c31 (patch) | |
tree | b808dfa57a7511db1828fb9fa08e11aef630458c | |
parent | ee86027acfe44dc070a8bfe9e37864c645276370 (diff) |
storage/posix: Print offset,size and gfid too when readv fails
... for better debuggability.
Backport of: http://review.gluster.org/#/c/14271/
Here's a sample log:
[2016-05-31 05:18:34.893951] E [MSGID: 113040] [posix.c:3089:posix_readv]
0-dis-posix: read failed on gfid=3744d34b-f798-4ce2-b421-cc632a9903bd,
fd=0x7f8b3c015abc, offset=131072 size=131072 [Invalid argument]
Change-Id: Ied4d6f5260c1e371955c03bdea0cb77c3426ba33
BUG: 1342387
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/14635
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r-- | xlators/storage/posix/src/posix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 8e1c12e1515..9ee2b2ed274 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -3084,7 +3084,9 @@ posix_readv (call_frame_t *frame, xlator_t *this, if (op_ret == -1) { op_errno = errno; gf_msg (this->name, GF_LOG_ERROR, errno, P_MSG_READ_FAILED, - "read failed on fd=%p", fd); + "read failed on gfid=%s, fd=%p, offset=%"PRIu64" " + "size=%"GF_PRI_SIZET"", uuid_utoa (fd->inode->gfid), fd, + offset, size); goto out; } |