mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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>
This commit is contained in:
committed by
Alex Elder
parent
5483e761dc
commit
0494a3c2f0