All of lore.kernel.org
 help / color / mirror / Atom feed
* reduce dmesg spam v2
@ 2020-02-20 15:39 Christoph Hellwig
  2020-02-20 15:39 ` [PATCH 1/2] xfs: ratelimit xfs_buf_ioerror_alert messages Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Christoph Hellwig @ 2020-02-20 15:39 UTC (permalink / raw)
  To: linux-xfs

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] xfs: ratelimit xfs_buf_ioerror_alert messages
  2020-02-20 15:39 reduce dmesg spam v2 Christoph Hellwig
@ 2020-02-20 15:39 ` Christoph Hellwig
  2020-02-20 17:59   ` Brian Foster
  2020-02-20 15:39 ` [PATCH 2/2] xfs: ratelimit xfs_discard_page messages Christoph Hellwig
  2020-02-21  4:41 ` reduce dmesg spam v2 Darrick J. Wong
  2 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2020-02-20 15:39 UTC (permalink / raw)
  To: linux-xfs

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 <hch@lst.de>
---
 fs/xfs/xfs_buf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 217e4f82a44a..0ceaa172545b 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -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);
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] xfs: ratelimit xfs_discard_page messages
  2020-02-20 15:39 reduce dmesg spam v2 Christoph Hellwig
  2020-02-20 15:39 ` [PATCH 1/2] xfs: ratelimit xfs_buf_ioerror_alert messages Christoph Hellwig
@ 2020-02-20 15:39 ` Christoph Hellwig
  2020-02-20 17:59   ` Brian Foster
  2020-02-21  4:41 ` reduce dmesg spam v2 Darrick J. Wong
  2 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2020-02-20 15:39 UTC (permalink / raw)
  To: linux-xfs

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 <hch@lst.de>
---
 fs/xfs/xfs_aops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 58e937be24ce..9d9cebf18726 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);
 
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] xfs: ratelimit xfs_buf_ioerror_alert messages
  2020-02-20 15:39 ` [PATCH 1/2] xfs: ratelimit xfs_buf_ioerror_alert messages Christoph Hellwig
@ 2020-02-20 17:59   ` Brian Foster
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Foster @ 2020-02-20 17:59 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Thu, Feb 20, 2020 at 07:39:20AM -0800, Christoph Hellwig wrote:
> 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 <hch@lst.de>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/xfs_buf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index 217e4f82a44a..0ceaa172545b 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -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);
> -- 
> 2.24.1
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] xfs: ratelimit xfs_discard_page messages
  2020-02-20 15:39 ` [PATCH 2/2] xfs: ratelimit xfs_discard_page messages Christoph Hellwig
@ 2020-02-20 17:59   ` Brian Foster
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Foster @ 2020-02-20 17:59 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Thu, Feb 20, 2020 at 07:39:21AM -0800, Christoph Hellwig wrote:
> 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 <hch@lst.de>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/xfs_aops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
> index 58e937be24ce..9d9cebf18726 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);
>  
> -- 
> 2.24.1
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: reduce dmesg spam v2
  2020-02-20 15:39 reduce dmesg spam v2 Christoph Hellwig
  2020-02-20 15:39 ` [PATCH 1/2] xfs: ratelimit xfs_buf_ioerror_alert messages Christoph Hellwig
  2020-02-20 15:39 ` [PATCH 2/2] xfs: ratelimit xfs_discard_page messages Christoph Hellwig
@ 2020-02-21  4:41 ` Darrick J. Wong
  2 siblings, 0 replies; 6+ messages in thread
From: Darrick J. Wong @ 2020-02-21  4:41 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Thu, Feb 20, 2020 at 07:39:19AM -0800, Christoph Hellwig wrote:
> 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,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> Changes sinve v1:
>   - use xfs_alert_ratelimited

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-21  4:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-20 15:39 reduce dmesg spam v2 Christoph Hellwig
2020-02-20 15:39 ` [PATCH 1/2] xfs: ratelimit xfs_buf_ioerror_alert messages Christoph Hellwig
2020-02-20 17:59   ` Brian Foster
2020-02-20 15:39 ` [PATCH 2/2] xfs: ratelimit xfs_discard_page messages Christoph Hellwig
2020-02-20 17:59   ` Brian Foster
2020-02-21  4:41 ` reduce dmesg spam v2 Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.