Make sure that any metadata that we repaired or regenerated has been
written to disk. If that fails, exit with 1 to signal that there are
still errors in the filesystem.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
struct xfs_sb psb;
int rval;
struct xfs_ino_geometry *igeo;
+ int error;
progname = basename(argv[0]);
setlocale(LC_ALL, "");
*/
libxfs_bcache_flush();
format_log_max_lsn(mp);
- libxfs_umount(mp);
+
+ /* Report failure if anything failed to get written to our fs. */
+ error = -libxfs_umount(mp);
+ if (error)
+ do_error(
+ _("File system metadata writeout failed, err=%d. Re-run xfs_repair."),
+ error);
libxfs_destroy(&x);