]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
Add test 251: Check filesystem FITRIM implementation
authorLukas Czerner <lczerner@redhat.com>
Wed, 9 Feb 2011 16:36:17 +0000 (16:36 +0000)
committerAlex Elder <aelder@sgi.com>
Tue, 22 Feb 2011 00:13:59 +0000 (18:13 -0600)
commit0494a3c2f0d0af56734e1fb34399f2cc81bb4c97
tree7923c9b4e43da9d59b64a2dede12a854fadd7e3a
parent5483e761dc98886d0a59561dec7d1a610461c699
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>
251 [new file with mode: 0644]
251.out [new file with mode: 0644]
group
src/Makefile
src/fstrim.c [new file with mode: 0644]