xfs/053: test for stale data exposure via falloc/writeback interaction
authorBrian Foster <bfoster@redhat.com>
Tue, 14 Oct 2014 11:59:39 +0000 (22:59 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 14 Oct 2014 11:59:39 +0000 (22:59 +1100)
commitcf1438248c0f62f3b64013d23e9e6d6bc23ca24b
tree5bdb0cf962da197118abfb15ff4af7c843262e06
parentedaea8a0750e2b3ba6ae8c1fd8c591206210b3c6
xfs/053: test for stale data exposure via falloc/writeback interaction

XFS buffered I/O writeback has a subtle race condition that leads to
stale data exposure if the filesystem happens to crash after delayed
allocation blocks are converted on disk and before data is written back
to said blocks.

Use file allocation commands to attempt to reproduce a related, but
slightly different variant of this problem. The associated falloc
commands can lead to partial writeback that converts an extent larger
than the range affected by falloc. If the filesystem crashes after the
extent conversion but before all other cached data is written to the
extent, stale data can be exposed.

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/053 [new file with mode: 0755]
tests/xfs/053.out [new file with mode: 0644]
tests/xfs/group