Skip to content

Commit

Permalink
iomap: enhance writeback error message
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Darrick J. Wong committed Oct 21, 2019
1 parent 48d64cd commit 9cd0ed6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/iomap/buffered-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 9cd0ed6

Please sign in to comment.