xfs: test per-inode DAX flag by IO

In a DAX mountpoint, do IO betwen files with and
without DAX per-inode flag. We do mmap, both
O_DIRECT and buffered read/write IO in this case.
Then test again in the same device without dax
mountoption.

Add help _require_scratch_dax to make sure we can
test DAX feature on SCRATCH_DEV.

Add mmap dio test programme to test read/write
between a mmap area of one file and another file
directly or buffered, with different size.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Xiong Zhou <xzhou@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Xiong Zhou
2017-02-08 12:11:17 +08:00
committed by Eryu Guan
parent 69924090d3
commit 456581661b
7 changed files with 287 additions and 1 deletions
+13
View File
@@ -2677,6 +2677,19 @@ _require_scratch_shutdown()
_scratch_unmount
}
# Does dax mount option work on this dev/fs?
_require_scratch_dax()
{
_require_scratch
_scratch_mkfs > /dev/null 2>&1
_scratch_mount -o dax
# Check options to be sure. XFS ignores dax option
# and goes on if dev underneath does not support dax.
_fs_options $SCRATCH_DEV | grep -qw "dax" || \
_notrun "$SCRATCH_DEV $FSTYP does not support -o dax"
_scratch_unmount
}
# Does norecovery support by this fs?
_require_norecovery()
{