2021-06-18 12:39:07

by Ritesh Harjani

[permalink] [raw]
Subject: [PATCH 0/9] kvmxfstests: Add 64K related configs for Power

Hello,

These patches adds and/or fixes configs for 64K blocksize/pagesize related
platform (e.g. Power). This series adds some new configs for btrfs and 64K
related configs for ext4/xfs/btrfs.

There are also some fixes related to dax and related to SCRATCH_DEV_POOL
env variable is used by btrfs.

Then the last patch adds some extra packages which many a times are useful while
manual debugging/testing.


Reason for ccing fstests:-
=========================
In past I saw kvmxfstests patches going via fstests. One other reason
for sending it via fstests was to get a feedback on the btrfs & XFS configs.
We have started using kvmxfstests for filesystem testing of ext4/XFS/btrfs on
Power platform and are planning to scale it further to tests weekly upstream
releases too. Thus if there are any suggestions around other configs (mainly for
btrfs and/or XFS) which must (good to include) be tested as part of filesystem
testing, then I will be happy to add those into kvmxfstests suite configs.
For e.g. look at different ext4 configs [1].

[1]: https://github.com/tytso/xfstests-bld/tree/master/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg

Ritesh Harjani (9):
ext4/cfg/dax: Fix for 64K pagesize platform
ext4/cfg/64K: Add a 64K related config file
ext4/cfg/fast_commit: Add explicit 4k bs option
ext4/cfg/fast_commit_64K: Add a config file to test fast_commit with 64K bs
xfs/cfg/dax: Fix this config to work on 64K pagesize platform too
xfs/cfg/64K: Add a config file with 64K blocksize
btrfs/cfg: Add 4k and 64k related configs
runtests.sh: Fix when SCRATCH_DEV_POOL is passed
xfstests-packages: Add some more packages.

kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/4k | 5 +++++
kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/64k | 5 +++++
kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/64k | 4 ++++
kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/dax | 4 ++--
.../test-appliance/files/root/fs/ext4/cfg/fast_commit | 2 +-
.../test-appliance/files/root/fs/ext4/cfg/fast_commit_64k | 4 ++++
kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/64k | 3 +++
kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/dax | 2 +-
kvm-xfstests/test-appliance/files/root/runtests.sh | 6 ++++++
kvm-xfstests/test-appliance/xfstests-packages | 4 ++++
10 files changed, 35 insertions(+), 4 deletions(-)
create mode 100644 kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/4k
create mode 100644 kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/64k
create mode 100644 kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/64k
create mode 100644 kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/fast_commit_64k
create mode 100644 kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/64k

--
2.31.1


2021-06-18 12:39:09

by Ritesh Harjani

[permalink] [raw]
Subject: [PATCH 1/9] ext4/cfg/dax: Fix for 64K pagesize platform

For dax we need blocksize same as pagesize. Hence make changes in this
to get the blocksize via $(getconf PAGE_SIZE) to fix it on 64K pagesize
platforms e.g. POWER.

Signed-off-by: Ritesh Harjani <[email protected]>
---
kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/dax | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/dax b/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/dax
index b46e661..de25d91 100644
--- a/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/dax
+++ b/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/dax
@@ -2,6 +2,6 @@ export TEST_DEV=/dev/pmem0
export TEST_DIR=$SM_TST_MNT
export SCRATCH_DEV=/dev/pmem1
export SCRATCH_MNT=$SM_SCR_MNT
-export EXT_MKFS_OPTIONS="-b 4096"
+export EXT_MKFS_OPTIONS="-b $(getconf PAGE_SIZE)"
export EXT_MOUNT_OPTIONS="dax"
-TESTNAME="Ext4 4k block using DAX"
+TESTNAME="Ext4 using DAX"
--
2.31.1

2021-06-18 12:39:14

by Ritesh Harjani

[permalink] [raw]
Subject: [PATCH 2/9] ext4/cfg/64K: Add a 64K related config file

Add a 64K related config for platforms like PPC64.

Signed-off-by: Ritesh Harjani <[email protected]>
---
kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/64k | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/64k

diff --git a/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/64k b/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/64k
new file mode 100644
index 0000000..1f5e6f2
--- /dev/null
+++ b/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/64k
@@ -0,0 +1,4 @@
+SIZE=small
+export EXT_MKFS_OPTIONS="-b 65536"
+export EXT_MOUNT_OPTIONS=""
+TESTNAME="Ext4 64k block"
--
2.31.1

2021-06-18 12:39:19

by Ritesh Harjani

[permalink] [raw]
Subject: [PATCH 4/9] ext4/cfg/fast_commit_64K: Add a config file to test fast_commit with 64K bs

This can be used to test fast_commit with 64K blocksize on
platforms like PPC64.

Signed-off-by: Ritesh Harjani <[email protected]>
---
.../test-appliance/files/root/fs/ext4/cfg/fast_commit_64k | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/fast_commit_64k

diff --git a/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/fast_commit_64k b/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/fast_commit_64k
new file mode 100644
index 0000000..4b0d3b1
--- /dev/null
+++ b/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/fast_commit_64k
@@ -0,0 +1,4 @@
+SIZE=small
+export EXT_MKFS_OPTIONS="-b 65536 -I 256 -O fast_commit,64bit"
+export EXT_MOUNT_OPTIONS=""
+TESTNAME="Ext4 64k block w/fast_commit"
--
2.31.1

2021-06-18 12:39:23

by Ritesh Harjani

[permalink] [raw]
Subject: [PATCH 5/9] xfs/cfg/dax: Fix this config to work on 64K pagesize platform too

w/o this patch XFS DAX tests fails on 64K pagesize platform like PPC64.

Signed-off-by: Ritesh Harjani <[email protected]>
---
kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/dax | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/dax b/kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/dax
index 6c85796..3a12ad2 100644
--- a/kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/dax
+++ b/kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/dax
@@ -2,6 +2,6 @@ export TEST_DEV=/dev/pmem0
export TEST_DIR=$SM_TST_MNT
export SCRATCH_DEV=/dev/pmem1
export SCRATCH_MNT=$SM_SCR_MNT
-export XFS_MKFS_OPTIONS="-bsize=4096 -mreflink=0"
+export XFS_MKFS_OPTIONS="-bsize=$(getconf PAGE_SIZE) -mreflink=0"
export XFS_MOUNT_OPTIONS="-o dax"
TESTNAME="XFS using DAX"
--
2.31.1

2021-06-18 12:39:23

by Ritesh Harjani

[permalink] [raw]
Subject: [PATCH 3/9] ext4/cfg/fast_commit: Add explicit 4k bs option

This test as of now is mainly used to test with 4k blocksize.
Hence add an explicit "-b 4096" option to reflect the same.

Signed-off-by: Ritesh Harjani <[email protected]>
---
kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/fast_commit | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/fast_commit b/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/fast_commit
index 0659c1a..295cda3 100644
--- a/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/fast_commit
+++ b/kvm-xfstests/test-appliance/files/root/fs/ext4/cfg/fast_commit
@@ -1,4 +1,4 @@
SIZE=small
-export EXT_MKFS_OPTIONS="-I 256 -O fast_commit,64bit"
+export EXT_MKFS_OPTIONS="-b 4096 -I 256 -O fast_commit,64bit"
export EXT_MOUNT_OPTIONS=""
TESTNAME="Ext4 4k block w/fast_commit"
--
2.31.1

2021-06-18 12:39:30

by Ritesh Harjani

[permalink] [raw]
Subject: [PATCH 7/9] btrfs/cfg: Add 4k and 64k related configs

This adds btrfs 4k and 64k configs.

Signed-off-by: Ritesh Harjani <[email protected]>
---
kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/4k | 5 +++++
kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/64k | 5 +++++
2 files changed, 10 insertions(+)
create mode 100644 kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/4k
create mode 100644 kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/64k

diff --git a/kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/4k b/kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/4k
new file mode 100644
index 0000000..c384b8d
--- /dev/null
+++ b/kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/4k
@@ -0,0 +1,5 @@
+SIZE=small
+export MKFS_OPTIONS="-s 4096 -n 4096"
+export MOUNT_OPTIONS=""
+export SCRATCH_DEV_POOL="/dev/vdc /dev/vdi /dev/vdj /dev/vdk"
+TESTNAME="btrfs 4k block"
diff --git a/kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/64k b/kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/64k
new file mode 100644
index 0000000..c234101
--- /dev/null
+++ b/kvm-xfstests/test-appliance/files/root/fs/btrfs/cfg/64k
@@ -0,0 +1,5 @@
+SIZE=small
+export SCRATCH_DEV_POOL="/dev/vdc /dev/vdi /dev/vdj /dev/vdk"
+export MKFS_OPTIONS="-s 65536 -n 65536"
+export MOUNT_OPTIONS=""
+TESTNAME="btrfs 64k block"
--
2.31.1

2021-06-18 12:39:35

by Ritesh Harjani

[permalink] [raw]
Subject: [PATCH 8/9] runtests.sh: Fix when SCRATCH_DEV_POOL is passed

btrfs may need more than 1 disk which mostly needs to be passed via
SCRATCH_DEV_POOL. In such case we should not set SCRATCH_DEV [1].

[1]: https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/README#n55

Signed-off-by: Ritesh Harjani <[email protected]>
---
kvm-xfstests/test-appliance/files/root/runtests.sh | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/kvm-xfstests/test-appliance/files/root/runtests.sh b/kvm-xfstests/test-appliance/files/root/runtests.sh
index 6cbda62..bfc5b24 100755
--- a/kvm-xfstests/test-appliance/files/root/runtests.sh
+++ b/kvm-xfstests/test-appliance/files/root/runtests.sh
@@ -288,6 +288,12 @@ do
export LOGWRITES_DEV=$LG_SCR_DEV
fi
fi
+
+ # This is required in case of BTRFS uses SCRATCH_DEV_POOL
+ if [[ -n $SCRATCH_DEV_POOL ]]; then
+ unset SCRATCH_DEV
+ fi
+
case "$TEST_DEV" in
*/ovl|9p*) ;;
*:/*) ;;
--
2.31.1

2021-06-18 12:39:49

by Ritesh Harjani

[permalink] [raw]
Subject: [PATCH 6/9] xfs/cfg/64K: Add a config file with 64K blocksize

This adds a 64K blocksize config file for xfs testing.

Signed-off-by: Ritesh Harjani <[email protected]>
---
kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/64k | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/64k

diff --git a/kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/64k b/kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/64k
new file mode 100644
index 0000000..3666d02
--- /dev/null
+++ b/kvm-xfstests/test-appliance/files/root/fs/xfs/cfg/64k
@@ -0,0 +1,3 @@
+SIZE=small
+export XFS_MKFS_OPTIONS="-bsize=65536"
+TESTNAME="XFS 64k block"
--
2.31.1

2021-06-18 12:42:51

by Ritesh Harjani

[permalink] [raw]
Subject: [PATCH 9/9] xfstests-packages: Add some more packages.

libnuma-dev is required otherwise fio complaints and failes to start
(seen on ppc64el)
ndctl is required for creating pmem namespaces.
remaining are good to have packages in case if any editing is required
when debugging/accessing shell using telnet.

Signed-off-by: Ritesh Harjani <[email protected]>
---
kvm-xfstests/test-appliance/xfstests-packages | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/kvm-xfstests/test-appliance/xfstests-packages b/kvm-xfstests/test-appliance/xfstests-packages
index 77dc2a8..85ca6a6 100644
--- a/kvm-xfstests/test-appliance/xfstests-packages
+++ b/kvm-xfstests/test-appliance/xfstests-packages
@@ -53,3 +53,7 @@ udftools
uuid-runtime
udev
xz-utils
+libnuma-dev
+ndctl
+git
+vim
--
2.31.1

2021-07-01 21:00:36

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 0/9] kvmxfstests: Add 64K related configs for Power

On Fri, Jun 18, 2021 at 04:39:51PM +0530, Ritesh Harjani wrote:
> Hello,
>
> These patches adds and/or fixes configs for 64K blocksize/pagesize related
> platform (e.g. Power). This series adds some new configs for btrfs and 64K
> related configs for ext4/xfs/btrfs.
>
> There are also some fixes related to dax and related to SCRATCH_DEV_POOL
> env variable is used by btrfs.
>
> Then the last patch adds some extra packages which many a times are useful while
> manual debugging/testing.

Applied, thanks!

- Ted