From: Christoph Hellwig Date: Fri, 21 Feb 2020 15:34:48 +0000 (-0800) Subject: xfs: ratelimit xfs_discard_page messages X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4ab45e259f31cc063805c659e3c203577722b701;p=linux.git xfs: ratelimit xfs_discard_page messages Use 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. 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_aops.c b/fs/xfs/xfs_aops.c index 58e937be24cee..9d9cebf187268 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -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);