Skip to contentSkip to conversation

iomap: enhance writeback error message

PATCH In review Darrick J. Wong 3 participants 3 messages Oct 17, 2019 – Oct 18, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iomap: enhance writeback error message

From: Darrick J. Wong <[email protected]>

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.

---
 fs/iomap/buffered-io.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
fs/iomap/buffered-io.c +3 -2
index 0fd58adcdeaa..55d7efa4fb8c 100644
@@ -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);
 	}
 }
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

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.

Looks good to me.

Signature · 2 lines
Dave Chinner
[email protected]