linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] aio: make io return value more readable
@ 2022-02-18  6:16 Xianting Tian
  0 siblings, 0 replies; only message in thread
From: Xianting Tian @ 2022-02-18  6:16 UTC (permalink / raw)
  To: bcrl, viro; +Cc: linux-aio, linux-fsdevel, linux-kernel, Xianting Tian

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-18  6:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-18  6:16 [PATCH] aio: make io return value more readable Xianting Tian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).