mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user