reduce dmesg spam v2
Hi all,
When a device keeps failing I/O (for example using dm-flakey in various tests), we keep spamming the log for each I/O error, although the messages are very much duplicates. Use xfs_alert_ratelimited() to reduce the number of logged lines.
Changes sinve v1:
- use xfs_alert_ratelimited
PATCH 1/2 xfs: ratelimit xfs_buf_ioerror_alert messages
Use printk_ratelimit() to limit the amount of messages printed from xfs_buf_ioerror_alert. Without that a failing device causes a large number of errors that doesn't really help debugging the underling issue.
--- fs/xfs/xfs_buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_buf.c +1 -1
@@ -1238,7 +1238,7 @@ xfs_buf_ioerror_alert( struct xfs_buf *bp, xfs_failaddr_t func) { -xfs_alert (bp->b_mount, +xfs_alert_ratelimited (bp->b_mount,"metadata I/O error in \"%pS\" at daddr 0x%llx len %d error %d" , func, (uint64_t )XFS_BUF_ADDR (bp), bp->b_length, -bp->b_error);
Signature · 1 line
2.24.1
Re: [PATCH 1/2] xfs: ratelimit xfs_buf_ioerror_alert messages
Quoted 7 lines · Christoph Hellwig
Use
printk_ratelimit()to limit the amount of messages printed fromxfs_buf_ioerror_alert. Without that a failing device causes a large number of errors that doesn't really help debugging the underling issue.Signed-off-by Christoph Hellwig <[email protected]>---
Quoted 19 lines
fs/xfs/xfs_buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/xfs_buf.c +1
-1@@ -1238,7 +1238,7 @@ xfs_buf_ioerror_alert( struct xfs_buf *bp, xfs_failaddr_t func) { -xfs_alert (bp->b_mount, +xfs_alert_ratelimited (bp->b_mount,"metadata I/O error in \"%pS\" at daddr 0x%llx len %d error %d" , func, (uint64_t )XFS_BUF_ADDR (bp), bp->b_length, -bp->b_error);Signature · 1 line
2.24.1
PATCH 2/2 xfs: ratelimit xfs_discard_page messages
In reply to Christoph HellwigUse printk_ratelimit() to limit the amount of messages printed from xfs_discard_page. Without that a failing device causes a large number of errors that doesn't really help debugging the underling issue.
--- fs/xfs/xfs_aops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_aops.c +1 -1
@@ -539,7 +539,7 @@ xfs_discard_page(if (XFS_FORCED_SHUTDOWN (mp)) goto out_invalidate; -xfs_alert (mp, +xfs_alert_ratelimited (mp,"page discard on page " PTR_FMT ", inode 0x%llx, offset %llu." , page, ip->i_ino, offset);
Signature · 1 line
2.24.1
Re: [PATCH 2/2] xfs: ratelimit xfs_discard_page messages
Quoted 7 lines · Christoph Hellwig
Use
printk_ratelimit()to limit the amount of messages printed fromxfs_discard_page. Without that a failing device causes a large number of errors that doesn't really help debugging the underling issue.Signed-off-by Christoph Hellwig <[email protected]>---
Quoted 19 lines
fs/xfs/xfs_aops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/xfs_aops.c +1
-1@@ -539,7 +539,7 @@ xfs_discard_page(if (XFS_FORCED_SHUTDOWN (mp)) goto out_invalidate; -xfs_alert (mp, +xfs_alert_ratelimited (mp,"page discard on page " PTR_FMT ", inode 0x%llx, offset %llu." , page, ip->i_ino, offset);Signature · 1 line
2.24.1
Darrick J. Wong
Reviewed-byQuoted 7 lines · Christoph Hellwig
Hi all,
When a device keeps failing I/O (for example using dm-flakey in various tests), we keep spamming the log for each I/O error, although the messages are very much duplicates. Use
xfs_alert_ratelimited()to reduce the number of logged lines.
This series looks ok to me,
--D
Quoted 2 lines
Changes sinve v1:
- usexfs_alert_ratelimited