xfs: test XFS torn log write detection
authorBrian Foster <bfoster@redhat.com>
Mon, 11 Jan 2016 04:11:20 +0000 (15:11 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 11 Jan 2016 04:11:20 +0000 (15:11 +1100)
commit05754e673fafd5473d63c214e362462d10bdb7a7
treed1504d380a9de71815d9954aba2cbe368763ff6b
parent37de4bfa173ccea990408b525c687e5c50bfec84
xfs: test XFS torn log write detection

XFS torn log write detection includes a mechanism to inject CRC errors
into log records at runtime and shutdown the fs accordingly. This
ensures that the CRC verification pass on the subsequent mount discovers
an invalid record near the head of the log and considers it a torn
write.

This test runs a workload with error injection enabled and verifies that
the subsequent mount is successful. The test repeats for several
iterations using a random frequency factor for the error event each
time.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/xfs/141 [new file with mode: 0755]
tests/xfs/141.out [new file with mode: 0644]
tests/xfs/group