Skip to content

Commit

Permalink
xfs: don't warn about page discards on shutdown
Browse files Browse the repository at this point in the history
If we are doing a forced shutdown, we can get lots of noise about
delalloc pages being discarded. This is happens by design during a
forced shutdown, so don't spam the logs with these messages.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
  • Loading branch information
Dave Chinner authored and Alex Elder committed Mar 16, 2010
1 parent 8a262e5 commit e8c3753
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,9 @@ xfs_aops_discard_page(
if (!xfs_is_delayed_page(page, IOMAP_DELAY))
goto out_invalidate;

if (XFS_FORCED_SHUTDOWN(ip->i_mount))
goto out_invalidate;

xfs_fs_cmn_err(CE_ALERT, ip->i_mount,
"page discard on page %p, inode 0x%llx, offset %llu.",
page, ip->i_ino, offset);
Expand Down Expand Up @@ -964,8 +967,10 @@ xfs_aops_discard_page(

if (error) {
/* something screwed, just bail */
xfs_fs_cmn_err(CE_ALERT, ip->i_mount,
"page discard failed delalloc mapping lookup.");
if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) {
xfs_fs_cmn_err(CE_ALERT, ip->i_mount,
"page discard failed delalloc mapping lookup.");
}
break;
}
if (!nimaps) {
Expand All @@ -991,8 +996,10 @@ xfs_aops_discard_page(
ASSERT(!flist.xbf_count && !flist.xbf_first);
if (error) {
/* something screwed, just bail */
xfs_fs_cmn_err(CE_ALERT, ip->i_mount,
if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) {
xfs_fs_cmn_err(CE_ALERT, ip->i_mount,
"page discard unable to remove delalloc mapping.");
}
break;
}
next_buffer:
Expand Down

0 comments on commit e8c3753

Please sign in to comment.