diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-08-11 03:55:56 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-08-13 17:58:27 +0300 |
commit | 00d22a1c367d03f469f8e1e924b062b09b0545e8 (patch) | |
tree | cb6d90656069fa13a1e5d32b9ab8bc0b166ef978 /fs | |
parent | 01239d77b9dd978863d1a75f0d095ab942a1fe66 (diff) | |
download | linux-00d22a1c367d03f469f8e1e924b062b09b0545e8.tar.xz |
xfs: recalculate summary counters at mount time if icount is bad
Since the sb write verifier trips on bad icounts, we should also force a
mount time recalculation of the summary counters if the icount is bad.
This helps us avoid blowing up at freeze/unmount time when the bad
counter gets written back out.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_mount.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 99db27d6ac8a..02d15098dbee 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -637,6 +637,7 @@ xfs_check_summary_counts( */ if (XFS_LAST_UNMOUNT_WAS_CLEAN(mp) && (mp->m_sb.sb_fdblocks > mp->m_sb.sb_dblocks || + !xfs_verify_icount(mp, mp->m_sb.sb_icount) || mp->m_sb.sb_ifree > mp->m_sb.sb_icount)) mp->m_flags |= XFS_MOUNT_BAD_SUMMARY; |