diff mbox series

iomap: enhance writeback error message

Message ID 20191017210110.GP13108@magnolia (mailing list archive)
State New, archived
Headers show
Series iomap: enhance writeback error message | expand

Commit Message

Darrick J. Wong Oct. 17, 2019, 9:01 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

If we encounter an IO error during writeback, log the inode, offset, and
sector number of the failure, instead of forcing the user to do some
sort of reverse mapping to figure out which file is affected.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/iomap/buffered-io.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Dave Chinner Oct. 17, 2019, 9:53 p.m. UTC | #1
On Thu, Oct 17, 2019 at 02:01:11PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> If we encounter an IO error during writeback, log the inode, offset, and
> sector number of the failure, instead of forcing the user to do some
> sort of reverse mapping to figure out which file is affected.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Looks good to me.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
Christoph Hellwig Oct. 18, 2019, 7:14 a.m. UTC | #2
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 0fd58adcdeaa..55d7efa4fb8c 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -1162,8 +1162,9 @@  iomap_finish_ioend(struct iomap_ioend *ioend, int error)
 
 	if (unlikely(error && !quiet)) {
 		printk_ratelimited(KERN_ERR
-			"%s: writeback error on sector %llu",
-			inode->i_sb->s_id, start);
+"%s: writeback error on inode %lu, offset %lld, sector %llu",
+			inode->i_sb->s_id, inode->i_ino, ioend->io_offset,
+			start);
 	}
 }