12a457
From 3339013b72d76906195a347fc2f71f48987b143a Mon Sep 17 00:00:00 2001
12a457
From: Krutika Dhananjay <kdhananj@redhat.com>
12a457
Date: Mon, 9 May 2016 16:53:19 +0530
12a457
Subject: [PATCH 185/192] storage/posix: Print offset,size and gfid too when readv fails
12a457
12a457
... for better debuggability.
12a457
12a457
        Backport of: http://review.gluster.org/14271
12a457
        3.7 backport: http://review.gluster.org/14625
12a457
12a457
Here's a sample log:
12a457
12a457
[2016-05-31 05:18:34.893951] E [MSGID: 113040] [posix.c:3089:posix_readv]
12a457
0-dis-posix: read failed on gfid=3744d34b-f798-4ce2-b421-cc632a9903bd,
12a457
fd=0x7f8b3c015abc, offset=131072 size=131072 [Invalid argument]
12a457
12a457
Change-Id: I35040a6c1e5108afd44ab49f4406fcd291465b64
12a457
BUG: 1339136
12a457
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
12a457
Reviewed-on: https://code.engineering.redhat.com/gerrit/75846
12a457
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
12a457
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
12a457
---
12a457
 xlators/storage/posix/src/posix.c |    4 +++-
12a457
 1 files changed, 3 insertions(+), 1 deletions(-)
12a457
12a457
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
12a457
index d5c18f1..e19da1a 100644
12a457
--- a/xlators/storage/posix/src/posix.c
12a457
+++ b/xlators/storage/posix/src/posix.c
12a457
@@ -3027,7 +3027,9 @@ posix_readv (call_frame_t *frame, xlator_t *this,
12a457
         if (op_ret == -1) {
12a457
                 op_errno = errno;
12a457
                 gf_msg (this->name, GF_LOG_ERROR, errno, P_MSG_READ_FAILED,
12a457
-                        "read failed on fd=%p", fd);
12a457
+                        "read failed on gfid=%s, fd=%p, offset=%"PRIu64" "
12a457
+                        "size=%"GF_PRI_SIZET"", uuid_utoa (fd->inode->gfid), fd,
12a457
+                        offset, size);
12a457
                 goto out;
12a457
         }
12a457
 
12a457
-- 
12a457
1.7.1
12a457