generic: add test for DAX MAP_SYNC support
This test creates a file and writes to it via an mmap(), but never syncs
via fsync/msync. This process is tracked via dm-log-writes, then replayed.
If MAP_SYNC is working the dm-log-writes replay will show the test file
with 1 MiB of on-media block allocations. This is because each allocating
page fault included an implicit metadata sync. If MAP_SYNC isn't working
(which you can test by removing the "-S" flag to xfs_io mmap) the file
will be smaller or missing entirely.
Note that dm-log-writes doesn't track the data that we write via the
mmap(), so we can't do any data integrity checking. We can only verify
that the metadata writes for the page faults happened.
Signed-off-by: Ross Zwisler <email@example.com>
3 files changed