From: Xianting Tian <xianting.tian@linux.alibaba.com>
To: bcrl@kvack.org, viro@zeniv.linux.org.uk
Cc: linux-aio@kvack.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
Xianting Tian <xianting.tian@linux.alibaba.com>
Subject: [PATCH] aio: make io return value more readable
Date: Fri, 18 Feb 2022 14:16:40 +0800 [thread overview]
Message-ID: <20220218061640.444038-1-xianting.tian@linux.alibaba.com> (raw)
We may need to enable the debug prints in aio_complete when met io error
issue. We got below prints, fffffffffffffffb means the io err is EIO(-5),
but it's not readable.
[ 33.304182] aio_complete: 00000000b3c70ea0[17]: 00000000cd131d11: 0000000023803e77 3fc2b160f0 fffffffffffffffb 0
Below prints are more readable, the value(-5) matches the errno defined
in include/uapi/asm-generic/errno-base.h,
[ 98.187270] aio_complete: 00000000220ae523[10]: 00000000045ed171: 000000004c334ae4 3fc211a330 -5 0
Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
---
fs/aio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/aio.c b/fs/aio.c
index 4ceba13a7..45a9ff3d2 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1140,7 +1140,7 @@ static void aio_complete(struct aio_kiocb *iocb)
kunmap_atomic(ev_page);
flush_dcache_page(ctx->ring_pages[pos / AIO_EVENTS_PER_PAGE]);
- pr_debug("%p[%u]: %p: %p %Lx %Lx %Lx\n", ctx, tail, iocb,
+ pr_debug("%p[%u]: %p: %p %Lx %Ld %Ld\n", ctx, tail, iocb,
(void __user *)(unsigned long)iocb->ki_res.obj,
iocb->ki_res.data, iocb->ki_res.res, iocb->ki_res.res2);
--
2.17.1
reply other threads:[~2022-02-18 6:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220218061640.444038-1-xianting.tian@linux.alibaba.com \
--to=xianting.tian@linux.alibaba.com \
--cc=bcrl@kvack.org \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®