From: Christoph Hellwig Date: Fri, 21 Feb 2020 15:34:47 +0000 (-0800) Subject: xfs: ratelimit xfs_buf_ioerror_alert messages X-Git-Tag: v5.7-rc1~125^2~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13b1f811b14e084579aeb4de89e59a2942d2c2d8;p=thirdparty%2Fkernel%2Flinux.git 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. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index c805ffae89130..f8e4fee206ffe 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -1239,7 +1239,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);