Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00d22a1c authored by Darrick J. Wong's avatar Darrick J. Wong
Browse files

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: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarAllison Henderson <allison.henderson@oracle.com>
Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
parent 01239d77
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;