From: Disha Goel <disgoel@linux.ibm.com>
To: Ojaswin Mujoo <ojaswin@linux.ibm.com>,
Zorro Lang <zlang@redhat.com>,
fstests@vger.kernel.org
Cc: djwong@kernel.org, fdmanana@suse.com, ritesh.list@gmail.com,
naohiro.aota@wdc.com, wqu@suse.com
Subject: Re: [PATCH 1/6] ext4/061,062: Minor fixes and refactoring
Date: Tue, 14 Apr 2026 15:22:35 +0530 [thread overview]
Message-ID: <48078f41-bf2b-4a00-ab92-da8c3f01f7f3@linux.ibm.com> (raw)
In-Reply-To: <a8692b9af458ffba24881fabb6ed9342ed4a6d93.1775802601.git.ojaswin@linux.ibm.com>
On 10/04/26 12:06 pm, Ojaswin Mujoo wrote:
> Fix 2 issues in the tests:
>
> 1. Use fs atomic write limits instead of bdev's
>
> The tests use block device's limits instead of limits advertised
> by filesystem. This can cause failures because block device might
> advertise a higher maximum than the FS. Fix the tests to use
> filesystem's limits instead.
>
> 2. Fix the test loop range
>
> Fix the test loop start and end so that our calculations for
> blocksize, clustersize and iosize are correct.
>
> Reported-by: Disha Goel <disgoel@linux.ibm.com>
> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
> Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Hi Ojaswin,
I've tested this patch and it works correctly. The tests now properly
use filesystem atomic write limits instead of block device limits.
Tested-by: Disha Goel <disgoel@linux.ibm.com>
> ---
> tests/ext4/061 | 28 ++++++++++++++++++++--------
> tests/ext4/062 | 26 +++++++++++++++++++-------
> 2 files changed, 39 insertions(+), 15 deletions(-)
>
> diff --git a/tests/ext4/061 b/tests/ext4/061
> index 1d61c8b0..69ddeaca 100755
> --- a/tests/ext4/061
> +++ b/tests/ext4/061
> @@ -31,10 +31,19 @@ _require_aiodio
> FIO_LOAD=$(($(nproc) * 2 * LOAD_FACTOR))
> SIZE=$((100*1024*1024))
>
> -# Calculate fsblocksize as per bdev atomic write units.
> -bdev_awu_min=$(_get_atomic_write_unit_min $SCRATCH_DEV)
> -bdev_awu_max=$(_get_atomic_write_unit_max $SCRATCH_DEV)
> -bs=$(_max 4096 "$bdev_awu_min")
> +_scratch_mkfs > /dev/null 2>&1 || \
> + _notrun "mkfs failed"
> +_try_scratch_mount || \
> + _notrun "mount failed"
> +
> +touch $SCRATCH_MNT/f
> +
> +fs_awu_min=$(_get_atomic_write_unit_min $SCRATCH_MNT/f)
> +fs_awu_max=$(_get_atomic_write_unit_max $SCRATCH_MNT/f)
> +bs=$(_max 4096 "$fs_awu_min")
> +ps=$(_get_page_size)
> +
> +_scratch_unmount
>
> function create_fio_configs()
> {
> @@ -97,10 +106,11 @@ run_test_one() {
> local cs=$2
> local iosize=$3
>
> + echo "== Testing: bs=$bs cs=$cs iosize=$iosize ==" >> $seqres.full
> +
> MKFS_OPTIONS="-O bigalloc -b $bs -C $cs"
> _scratch_mkfs_ext4 >> $seqres.full 2>&1 || return
> if _try_scratch_mount >> $seqres.full 2>&1; then
> - echo "== Testing: bs=$bs cs=$cs iosize=$iosize ==" >> $seqres.full
>
> touch $SCRATCH_MNT/f1
> create_fio_configs $iosize
> @@ -127,7 +137,7 @@ run_test() {
> # cluster sizes above 16 x blocksize are experimental so avoid them
> # Also, cap cluster size at 128kb to keep it reasonable for large
> # blocks size
> - max_cs=$(_min $((16 * bs)) "$bdev_awu_max" $((128 * 1024)))
> + max_cs=$(_min $((16 * bs)) "$fs_awu_max" $((128 * 1024)))
>
> # Fuzz for combinations of blocksize, clustersize and
> # iosize that cover most of the cases
> @@ -145,8 +155,10 @@ fio_out=$tmp.fio.out
> create_fio_configs $bs
> _require_fio $fio_aw_config
>
> -for ((bs=$bs; bs <= $(_get_page_size); bs = $bs << 1)); do
> - run_test $bs
> +echo "Awu min: $fs_awu_min Awu max: $fs_awu_max" >> $seqres.full
> +
> +for ((bs=$fs_awu_min; bs <= $(_min ps fs_awu_max); bs = $bs << 1)); do
> + run_test $bs $cs $iosize
> done
>
> # success, all done
> diff --git a/tests/ext4/062 b/tests/ext4/062
> index 05cce696..56bf080c 100755
> --- a/tests/ext4/062
> +++ b/tests/ext4/062
> @@ -33,10 +33,19 @@ _require_aiodio
> FSSIZE=$((360*1024*1024))
> FIO_LOAD=$(($(nproc) * LOAD_FACTOR))
>
> -# Calculate bs as per bdev atomic write units.
> -bdev_awu_min=$(_get_atomic_write_unit_min $SCRATCH_DEV)
> -bdev_awu_max=$(_get_atomic_write_unit_max $SCRATCH_DEV)
> -bs=$(_max 4096 "$bdev_awu_min")
> +_scratch_mkfs > /dev/null 2>&1 || \
> + _notrun "mkfs failed"
> +_try_scratch_mount || \
> + _notrun "mount failed"
> +
> +touch $SCRATCH_MNT/f
> +
> +fs_awu_min=$(_get_atomic_write_unit_min $SCRATCH_MNT/f)
> +fs_awu_max=$(_get_atomic_write_unit_max $SCRATCH_MNT/f)
> +bs=$(_max 4096 "$fs_awu_min")
> +ps=$(_get_page_size)
> +
> +_scratch_unmount
>
> function create_fio_configs()
> {
> @@ -146,10 +155,11 @@ run_test_one() {
> local cs=$2
> local iosize=$3
>
> + echo "Testing: bs=$bs cs=$cs iosize=$iosize" >> $seqres.full
> +
> MKFS_OPTIONS="-O bigalloc -b $bs -C $cs"
> _scratch_mkfs_sized "$FSSIZE" >> $seqres.full 2>&1 || return
> if _try_scratch_mount >> $seqres.full 2>&1; then
> - echo "Testing: bs=$bs cs=$cs iosize=$iosize" >> $seqres.full
>
> touch $SCRATCH_MNT/f1
> create_fio_configs $iosize
> @@ -175,7 +185,7 @@ run_test() {
> # cluster sizes above 16 x blocksize are experimental so avoid them
> # Also, cap cluster size at 128kb to keep it reasonable for large
> # blocks size
> - max_cs=$(_min $((16 * bs)) "$bdev_awu_max" $((128 * 1024)))
> + max_cs=$(_min $((16 * bs)) "$fs_awu_max" $((128 * 1024)))
>
> # Fuzz for combinations of blocksize, clustersize and
> # iosize that cover most of the cases
> @@ -193,7 +203,9 @@ fio_out=$tmp.fio.out
> create_fio_configs $bs
> _require_fio $fio_aw_config
>
> -for ((bs=$bs; bs <= $(_get_page_size); bs = $bs << 1)); do
> +echo "Awu min: $fs_awu_min Awu max: $fs_awu_max" >> $seqres.full
> +
> +for ((bs=$fs_awu_min; bs <= $(_min ps fs_awu_max); bs = $bs << 1)); do
> run_test $bs $cs $iosize
> done
>
--
Regards,
Disha
next prev parent reply other threads:[~2026-04-14 9:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 6:36 [PATCH v2 0/6] Atomic write test fixes & refactoring Ojaswin Mujoo
2026-04-10 6:36 ` [PATCH 1/6] ext4/061,062: Minor fixes and refactoring Ojaswin Mujoo
2026-04-14 9:52 ` Disha Goel [this message]
2026-04-10 6:36 ` [PATCH 2/6] common/rc: Add _sysfs_queue_path helper with partition support Ojaswin Mujoo
2026-04-10 16:50 ` Darrick J. Wong
2026-04-10 6:36 ` [PATCH 3/6] generic/765: Fix sysfs queue path for nvme partitions Ojaswin Mujoo
2026-04-10 16:50 ` Darrick J. Wong
2026-04-14 9:58 ` Disha Goel
2026-04-10 6:36 ` [PATCH 4/6] generic/765: Ignore mkfs warning Ojaswin Mujoo
2026-04-10 16:54 ` Darrick J. Wong
2026-04-12 17:08 ` Ojaswin Mujoo
2026-04-13 9:04 ` Ojaswin Mujoo
2026-04-13 16:21 ` Darrick J. Wong
2026-04-13 20:42 ` Theodore Tso
2026-04-13 23:28 ` Darrick J. Wong
2026-04-15 18:52 ` Ojaswin Mujoo
2026-04-16 15:55 ` Zorro Lang
2026-04-12 19:23 ` Zorro Lang
2026-04-13 9:09 ` Ojaswin Mujoo
2026-04-14 10:02 ` Disha Goel
2026-04-10 6:36 ` [PATCH 5/6] generic/775: Fix an infinite loop due to variable name clash Ojaswin Mujoo
2026-04-10 16:51 ` Darrick J. Wong
2026-04-14 10:05 ` Disha Goel
2026-04-10 6:36 ` [PATCH 6/6] treewide: Use _sysfs_queue_path helper in all queue access locations Ojaswin Mujoo
2026-04-10 16:52 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48078f41-bf2b-4a00-ab92-da8c3f01f7f3@linux.ibm.com \
--to=disgoel@linux.ibm.com \
--cc=djwong@kernel.org \
--cc=fdmanana@suse.com \
--cc=fstests@vger.kernel.org \
--cc=naohiro.aota@wdc.com \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=wqu@suse.com \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox