xfs_repair scans the filesystem and corrects any problems encountered.
xfs_repair performs a scan and repair in seven phases.
Each phase relies on the previous phase to fix a certain class of potential errors.
xfs_repair uses libxfs which is a partial port of the XFS kernel code to user-space.