xfs: ratelimit unmount time per-buffer I/O error alert
authorBrian Foster <bfoster@redhat.com>
Wed, 6 May 2020 20:25:21 +0000 (13:25 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 7 May 2020 15:27:46 +0000 (08:27 -0700)
commit61948b6fb276ad95ad63f82863e607719a31a628
treeb62dd5fc36f4e79a44df80b8e8e55769301e2f22
parentf9bccfcc3b59b9aba64791ab3a2bfefe681ab75b
xfs: ratelimit unmount time per-buffer I/O error alert

At unmount time, XFS emits an alert for every in-core buffer that
might have undergone a write error. In practice this behavior is
probably reasonable given that the filesystem is likely short lived
once I/O errors begin to occur consistently. Under certain test or
otherwise expected error conditions, this can spam the logs and slow
down the unmount.

Now that we have a ratelimit mechanism specifically for buffer
alerts, reuse it for the per-buffer alerts in xfs_wait_buftarg().
Also lift the final repair message out of the loop so it always
prints and assert that the metadata error handling code has shut
down the fs.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_buf.c