_check_xfs_filesystem: sync fs before running scrub
Tests can create a scenario in which a call to syncfs() issued at the end of
the execution of the test script would return an error code. xfs_scrub
internally calls syncfs() before starting the actual online consistency check
operation. Since this call to syncfs() fails, xfs_scrub ends up returning
without performing consistency checks on the test filesystem. This can mask a
possible on-disk data structure corruption.
To fix the above stated problem, this commit invokes syncfs() prior to
executing xfs_scrub.
Suggested-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Allison Henderson <allison.henderson@oracle.com> Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>