2022-11-01 20:09:18

by Eric Whitney

[permalink] [raw]
Subject: [PATCH] test-appliance: force 4 KB block size for bigalloc, bigalloc_inline

The cfg file for the bigalloc test configuration does not explicitly
define the file system block size as is done for the 4k configuration,
although the intent is to test a file system with 4 KB blocks and 64 KB
clusters. At least one test, shared/298, runs with a block size of
1 KB instead under bigalloc because it creates a file system image less
than 512 MB in size, a result of the mke2fs.conf block size rule
for small files.

shared/298 currently fails when run under bigalloc with 1 KB blocks.
When the block size is set to 4 KB for the test, it passes.

Explicitly defining the bigalloc block size will help avoid similar
surprises in current or future tests written to use small test files.
Make the same change to the bigalloc_inline config file while we're
at it.

Signed-off-by: Eric Whitney <[email protected]>
---
test-appliance/files/root/fs/ext4/cfg/bigalloc | 2 +-
test-appliance/files/root/fs/ext4/cfg/bigalloc_inline | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test-appliance/files/root/fs/ext4/cfg/bigalloc b/test-appliance/files/root/fs/ext4/cfg/bigalloc
index 18b0a60..366bf38 100644
--- a/test-appliance/files/root/fs/ext4/cfg/bigalloc
+++ b/test-appliance/files/root/fs/ext4/cfg/bigalloc
@@ -1,5 +1,5 @@
SIZE=large
-export EXT_MKFS_OPTIONS="-O bigalloc"
+export EXT_MKFS_OPTIONS="-b 4096 -O bigalloc"
export EXT_MOUNT_OPTIONS=""

# Until we can teach xfstests the difference between cluster size and
diff --git a/test-appliance/files/root/fs/ext4/cfg/bigalloc_inline b/test-appliance/files/root/fs/ext4/cfg/bigalloc_inline
index 46af536..12ad66e 100644
--- a/test-appliance/files/root/fs/ext4/cfg/bigalloc_inline
+++ b/test-appliance/files/root/fs/ext4/cfg/bigalloc_inline
@@ -1,5 +1,5 @@
SIZE=large
-export EXT_MKFS_OPTIONS="-O bigalloc,inline_data"
+export EXT_MKFS_OPTIONS="-b 4096 -O bigalloc,inline_data"
export EXT_MOUNT_OPTIONS=""

# Until we can teach xfstests the difference between cluster size and
--
2.30.2