]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
shared/298: unmount filesystem before examining underlying storage
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 4 Mar 2019 21:19:29 +0000 (13:19 -0800)
committerEryu Guan <guaneryu@gmail.com>
Thu, 7 Mar 2019 04:43:54 +0000 (12:43 +0800)
commit6f157d593afb6bb01fa68bfcfd76a987b0a834ac
tree2b5f3b587b6b2a7882251ac33a6743f53a5eee06
parentcd508feb01fa47b546419b505fb7bf092c6fa2df
shared/298: unmount filesystem before examining underlying storage

This test does some weird things with live filesystems -- it seems to be
validating the behavior of fstrim by comparing the filesystem's free
space map to holes in the file image that backs the filesystem.
However, this doesn't account for the fact that some filesystems
maintain in-core preallocations and/or can perturb the free space data
during unmount.  This causes sporadic test failures when the two become
out of sync.

Therefore, make sure we unmount the filesystem before we start running
tools against the filesystem image file to eliminate the possibility of
changes to the free space map.  This was found by running shared/298 on
xfs with a 1k block size.

cc: enwlinux@gmail.com
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/shared/298