The purpose of this series is to exercise the new MAP_SYNC mmap()
functionality . It adds a test which uses dm-log-writes to try and
replay filesystem metadata operations for a file that is being written via
If MAP_SYNC is active the dm-log-writes replay will recreate the file's
block allocations and you'll end up with a test file which is a known
If MAP_SYNC is not active the metadata writes will most likely be lost and
the replay will either fail to create the test file at all or it will may
be smaller. In all of my testing the file simply doesn't exist on the
replay if MAP_SYNC is ommited.
This test relies on a kernel with both the MAP_SYNC mmap() functionality
and the DAX enabling in dm-log-writes. These will both appear in kernel
v4.15-rc1. For ease of testing I've posted a kernel that is v4.14 plus
just those two patch series .
This test also relies on xfsprogs having support for MAP_SYNC and for
dm-log-writes. I've posed a tree adding that support . This xfsprogs
series is still under review so if the xfs_io interfaces change this
test will of course need to be updated as well.
Lastly, I've also posted a working version of this series .
Changes since v3:
- Enhanced xfs_io with MAP_SYNC and dm-log-writes functionality instead of
creating a one-off test program. (Dave Chinner)
- Improved dm target version checking. (Amir)
- Fixed dm-log-writes replay issue, some general cleanup, broke changes
out into a series.
Ross Zwisler (4):
common/rc: add _scratch_has_mount_option()
dm-log-writes: only replay log to marks that exist
dm-log-writes: allow DAX to be used when possible
generic: add test for DAX MAP_SYNC support
common/dmlogwrites | 9 +++--
common/rc | 33 ++++++++++++++++--
doc/requirement-checking.txt | 5 +--
tests/generic/468 | 83 ++++++++++++++++++++++++++++++++++++++++++++
tests/generic/468.out | 3 ++
tests/generic/group | 1 +
6 files changed, 128 insertions(+), 6 deletions(-)
create mode 100755 tests/generic/468
create mode 100644 tests/generic/468.out