fstests: add stress truncation + writeback test
Stress test folio splits by using the new debugfs interface to a target
a new smaller folio order while triggering writeback at the same time.
This is known to only creates a crash with min order enabled, so for example
with a 16k block sized XFS test profile, an xarray fix for that is merged
already. This issue is fixed by kernel commit
2a0774c2886d ("XArray: set the
marks correctly when splitting an entry").
If inspecting more closely, you'll want to enable on your kernel boot:
dyndbg='file mm/huge_memory.c +p'
Since we want to race large folio splits we also augment the full test
output log $seqres.full with the test specific number of successful
splits from vmstat thp_split_page and thp_split_page_failed. The larger
the vmstat thp_split_page the more we stress test this path.
This test reproduces a really hard to reproduce crash immediately.
[zlang: add _require_debugfs into _require_split_huge_pages_knob]
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>