xfs: testcase for kernelspace xfs_fsr extent handling flaw
This is a testcase for a bug which goes way back; googling
"xfs_trans_log_inode NULL pointer dereference" yields sporadic
reports over several years.
The test sets up several two-extent files with speculative
preallocation on them, and then runs xfs_fsr. The kernelside
code ignores the preallocation, and therefore sets up the
temporary inode incorrectly after the inode fork swap.
It is a "dangerous" test because the extent mishandling on
the temporary inode causes a null pointer dereference and
oops when the inode's i_itemp pointer gets overwritten
and we blow up in logging code that tries to use it.