On 2020/6/10 23:59, Darrick J. Wong wrote:
On Wed, Jun 10, 2020 at 02:16:45PM +0800, Xiao Yang wrote:
On 2020/6/10 0:42, Darrick J. Wong wrote:
On Wed, Jun 03, 2020 at 10:01:15PM +0800, Xiao Yang wrote:
Both ext4 and xfs support per-inode DAX flag now so move it to generic.
Signed-off-by: Xiao Yang<yangx.jy@xxxxxxxxxxxxxx>
---
tests/{xfs/260 => generic/602} | 12 ++++++++----
tests/generic/602.out | 2 ++
tests/generic/group | 1 +
tests/xfs/260.out | 2 --
tests/xfs/group | 1 -
5 files changed, 11 insertions(+), 7 deletions(-)
rename tests/{xfs/260 => generic/602} (91%)
create mode 100644 tests/generic/602.out
delete mode 100644 tests/xfs/260.out
diff --git a/tests/xfs/260 b/tests/generic/602
similarity index 91%
rename from tests/xfs/260
rename to tests/generic/602
index fbdc4cd8..0cd20f31 100755
--- a/tests/xfs/260
+++ b/tests/generic/602
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2017 Red Hat Inc. All Rights Reserved.
#
-# FS QA Test 260
+# FS QA Test 602
#
# Test per-inode DAX flag by mmap direct/buffered IO.
#
@@ -28,7 +28,7 @@ _cleanup()
# remove previous $seqres.full before test
rm -f $seqres.full
-_supported_fs xfs
+_supported_fs generic
_supported_os Linux
_require_scratch_dax_mountopt "dax"
_require_test_program "feature"
@@ -121,8 +121,12 @@ do_tests()
t_dax_flag_mmap_dio $((64 * 1024 * 1024))
}
-# make xfs 2Mb aligned for PMD fault testing
-_scratch_mkfs "-d su=2m,sw=1"> /dev/null 2>&1
+# make 2Mb aligned for PMD fault testing
+mkfs_opts=""
+[ "$FSTYP" = "ext4" ]&& mkfs_opts="-E stride=512,stripe_width=1"
+[ "$FSTYP" = "xfs" ]&& mkfs_opts="-d su=2m,sw=1"
/me wonders if this ought to be smart enough to sniff out the hugepage
size on the test machine...
Hi Darrick,
PMD page is always 2M, I am not sure why we need to sniff out the hugepage
size? Could you give me an example?
arm64, which can have 512M hugepages.
ppc64, which can have 16M huge pages (I think?)
Hi Darrick,
Sorry I don't understand what you mean.
I know different arches have different page size/hugepage size but I
don't know the relationship between PMD page fault and hugepage.
Accodring to dax.txt in kernel, it seems that we have to format block
device with a fixed block size which is equal to kernel's page size.
mount will fail or disable dax feature if block size is not equal to
kernel's page size, so do you mean this?
Best Regards,
Xiao Yang
--D
Best Regards,
Xiao Yang
--D
+
+_scratch_mkfs "$mkfs_opts"> /dev/null 2>&1
# mount with dax option
_scratch_mount "-o dax"
diff --git a/tests/generic/602.out b/tests/generic/602.out
new file mode 100644
index 00000000..61976e5e
--- /dev/null
+++ b/tests/generic/602.out
@@ -0,0 +1,2 @@
+QA output created by 602
+Silence is golden
diff --git a/tests/generic/group b/tests/generic/group
index c6ce029c..4bda3772 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -604,3 +604,4 @@
599 auto quick remount shutdown
600 auto quick quota
601 auto quick quota
+602 auto attr quick dax
diff --git a/tests/xfs/260.out b/tests/xfs/260.out
deleted file mode 100644
index 18ca517c..00000000
--- a/tests/xfs/260.out
+++ /dev/null
@@ -1,2 +0,0 @@
-QA output created by 260
-Silence is golden
diff --git a/tests/xfs/group b/tests/xfs/group
index daf54add..71c30898 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -257,7 +257,6 @@
257 auto quick clone
258 auto quick clone
259 auto quick
-260 auto attr quick dax
261 auto quick quota
262 dangerous_fuzzers dangerous_scrub dangerous_online_repair
263 auto quick quota
--
2.21.0
.
.