From: Darrick J. Wong <djwong@xxxxxxxxxx> Make sure we flush stdout after printf'ing to it, especially before we start any operation that could take a while to complete. Most of scrub already does this, but we missed a couple of spots. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- scrub/xfs_scrub.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scrub/xfs_scrub.c b/scrub/xfs_scrub.c index 4b96723f9ba..6c090a6dd88 100644 --- a/scrub/xfs_scrub.c +++ b/scrub/xfs_scrub.c @@ -535,6 +535,7 @@ _("%s: repairs made: %llu.\n"), fprintf(stdout, _("%s: optimizations made: %llu.\n"), ctx->mntpoint, ctx->preens); + fflush(stdout); } static void @@ -620,6 +621,7 @@ main( int error; fprintf(stdout, "EXPERIMENTAL xfs_scrub program in use! Use at your own risk!\n"); + fflush(stdout); progname = basename(argv[0]); setlocale(LC_ALL, "");