Commit Graph

2 Commits

Author SHA1 Message Date
Tao Ma 30456902c6 xfstests: fix error discard test output in 251.out
I don't know why, but discard tests is 251 in xfs, but 251.out has
number of 248 in it, So it fails.  Change it to 251 now.

Cc: Lukas Czerner <lczerner@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Alex Elder <aelder@sgi.com>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-05-03 13:41:10 -05:00
Lukas Czerner 0494a3c2f0 Add test 251: Check filesystem FITRIM implementation
FITRIM ioctl  is used on a mounted filesystem to discard (or "trim")
blocks which are not in use by the filesystem.  This is useful for
solid-state drives (SSDs) and thinly-provi-sioned storage. This test
helps to verify filesystem FITRIM implementation to assure that it
does not corrupts data.

This test creates checksums of all files in xfstests directory and
run several processes which clear its working directory on SCRATCH_MNT,
then copy everything from xfstests into its working directory, create
list of files in working directory and its checksums and compare it with the
original list of checksums. Every process works in the loop so it repeat
remove->copy->check, while fstrim tool is running simultaneously.

Fstrim is just a helper tool which uses FITRIM ioctl to actually do the
filesystem discard.

I found this very useful because when the FITRIM is really buggy (thus
data-destroying) the 251 test will notice, because checksums will most
likely change.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-02-21 18:13:59 -06:00