public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Cc: fstests@vger.kernel.org, Ritesh Harjani <ritesh.list@gmail.com>,
	john.g.garry@oracle.com
Subject: Re: [RFC 01/12] common/preamble: Fix fsx for ext4 with bigalloc
Date: Wed, 11 Jun 2025 07:30:05 -0700	[thread overview]
Message-ID: <20250611143005.GF6143@frogsfrogsfrogs> (raw)
In-Reply-To: <2568ed1e9d1c47d0fdb357f0e10c5ed341a72379.1749629233.git.ojaswin@linux.ibm.com>

On Wed, Jun 11, 2025 at 03:04:44PM +0530, Ojaswin Mujoo wrote:
> From: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
> 
> Insert range and collapse range only works with bigalloc in case
> the range is cluster size aligned, which fsx doesnt take care. To
> work past this, disable insert range and collapse range on ext4, if
> bigalloc is enabled.

Hmmm, insert/collapse-range have the same behavior on xfs realtime,
maybe we should amend test() in fsx to round to the allocation unit
size?

Querying that programmatically might be ... interesting though.  Is
there a good way to do that for ext4 bigalloc?

(See detect_xfs_alloc_unit in punch-alternating.c)

--D

> This is achieved by defining a new function _setup_fs_options
> which can serve as a mechanism to apply FS-wide options to
> the tests.
> 
> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
> Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
> ---
>  common/preamble | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/common/preamble b/common/preamble
> index ba029a34..2bccff74 100644
> --- a/common/preamble
> +++ b/common/preamble
> @@ -24,6 +24,20 @@ _register_cleanup()
>  	trap "${cleanup}exit \$status" EXIT HUP INT QUIT TERM $*
>  }
>  
> +# setup FS options only to be available for each test run
> +_setup_fs_options() {
> +	case "$FSTYP" in
> +	"ext4")
> +		if [[ "$MKFS_OPTIONS" =~ bigalloc ]]; then
> +			export FSX_AVOID="-I -C"
> +		fi
> +		;;
> +	# Add other filesystem types here as needed
> +	*)
> +		;;
> +	esac
> +}
> +
>  # Prepare to run a fstest by initializing the required global variables to
>  # their defaults, sourcing common functions, registering a cleanup function,
>  # and removing the $seqres.full file.
> @@ -55,4 +69,6 @@ _begin_fstest()
>  	# remove previous $seqres.full before test
>  	rm -f $seqres.full $seqres.hints
>  
> +	# setup filesystem options for a given test execution
> +	_setup_fs_options
>  }
> -- 
> 2.49.0
> 
> 

  reply	other threads:[~2025-06-11 14:30 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11  9:34 [RFC 00/12] Add more tests for multi fs block atomic writes Ojaswin Mujoo
2025-06-11  9:34 ` [RFC 01/12] common/preamble: Fix fsx for ext4 with bigalloc Ojaswin Mujoo
2025-06-11 14:30   ` Darrick J. Wong [this message]
2025-06-12  6:11     ` Ojaswin Mujoo
2025-06-12 14:36       ` Darrick J. Wong
2025-06-13  5:31         ` Ojaswin Mujoo
2025-06-13 15:04           ` Darrick J. Wong
2025-06-17  6:22             ` Ojaswin Mujoo
2025-06-30 15:27               ` Darrick J. Wong
2025-06-18 19:13   ` Zorro Lang
2025-06-20  6:21     ` Ojaswin Mujoo
2025-06-20  9:59       ` Zorro Lang
2025-06-11  9:34 ` [RFC 02/12] common/rc: Add a helper to run fsx on a given file Ojaswin Mujoo
2025-06-11 14:31   ` Darrick J. Wong
2025-06-12  6:17     ` Ojaswin Mujoo
2025-06-12 14:35       ` Darrick J. Wong
2025-06-11  9:34 ` [RFC 03/12] ltp/fsx.c: Add atomic writes support to fsx Ojaswin Mujoo
2025-06-11 14:35   ` Darrick J. Wong
2025-06-12  6:18     ` Ojaswin Mujoo
2025-06-11  9:34 ` [RFC 04/12] generic/767: Add atomic write test using fio crc check verifier Ojaswin Mujoo
2025-06-11 14:42   ` Darrick J. Wong
2025-06-12  6:22     ` Ojaswin Mujoo
2025-06-12 14:55       ` Darrick J. Wong
2025-06-18 19:34   ` Zorro Lang
2025-06-20  7:06     ` Ojaswin Mujoo
2025-06-11  9:34 ` [RFC 05/12] generic/769: Add atomic write test using fio verify on file mixed mappings Ojaswin Mujoo
2025-06-11 15:35   ` Darrick J. Wong
2025-06-11  9:34 ` [RFC 06/12] generic/770: Add atomic write multi-fsblock O_[D]SYNC tests Ojaswin Mujoo
2025-06-11 15:36   ` Darrick J. Wong
2025-06-12  6:23     ` Ojaswin Mujoo
2025-06-18 20:17   ` Zorro Lang
2025-06-20  8:20     ` Ojaswin Mujoo
2025-06-20 12:12       ` Zorro Lang
2025-06-11  9:34 ` [RFC 07/12] generic/771: Stress fsx with atomic writes enabled Ojaswin Mujoo
2025-06-11 14:45   ` Darrick J. Wong
2025-06-12  6:27     ` Ojaswin Mujoo
2025-06-12 15:14       ` Darrick J. Wong
2025-06-13  5:20         ` Ojaswin Mujoo
2025-06-18 20:27   ` Zorro Lang
2025-06-20  8:26     ` Ojaswin Mujoo
2025-06-11  9:34 ` [RFC 08/12] generic/772: Add sudden shutdown tests for multi block atomic writes Ojaswin Mujoo
2025-06-11 15:38   ` Darrick J. Wong
2025-06-12  6:28     ` Ojaswin Mujoo
2025-06-19  7:15   ` Zorro Lang
2025-06-20 11:11     ` Ojaswin Mujoo
2025-06-20 14:05   ` John Garry
2025-06-20 15:24     ` Ojaswin Mujoo
2025-06-11  9:34 ` [RFC 09/12] ext4/061: Atomic writes stress test for bigalloc using fio crc verifier Ojaswin Mujoo
2025-06-19  7:43   ` Zorro Lang
2025-06-20 15:08     ` Ojaswin Mujoo
2025-06-20 16:53       ` Zorro Lang
2025-06-11  9:34 ` [RFC 10/12] ext4/062: Atomic writes test for bigalloc using fio crc verifier on multiple files Ojaswin Mujoo
2025-06-12 10:26   ` John Garry
2025-06-13  5:37     ` Ojaswin Mujoo
2025-06-20 14:01       ` John Garry
2025-06-20 16:49         ` Ojaswin Mujoo
2025-06-19  7:45   ` Zorro Lang
2025-06-11  9:34 ` [RFC 11/12] ext4/063: Atomic write test for extent split across leaf nodes Ojaswin Mujoo
2025-06-19  7:52   ` Zorro Lang
2025-06-11  9:34 ` [RFC 12/12] ext4/064: Add atomic write tests for journal credit calculation Ojaswin Mujoo
2025-06-19  7:58   ` Zorro Lang

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=20250611143005.GF6143@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=john.g.garry@oracle.com \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.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