public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Zorro Lang <zlang@redhat.com>
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 1/2] xfs/032: try running on blocksize > pagesize filesystems
Date: Mon, 6 Jan 2025 10:13:22 -0800	[thread overview]
Message-ID: <20250106181322.GE6174@frogsfrogsfrogs> (raw)
In-Reply-To: <20241222124421.skfeoi35bpvjjamt@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com>

On Sun, Dec 22, 2024 at 08:44:21PM +0800, Zorro Lang wrote:
> On Tue, Dec 03, 2024 at 07:45:49PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > Now that we're no longer limited to blocksize <= pagesize, let's make
> > sure that mkfs, fsstress, and copy work on such things.  This is also a
> > subtle way to get more people running at least one test with that
> > config.
> > 
> > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > ---
> 
> Hi Darrick, sorry for missing this patchset long time :-D

No worries.

> >  tests/xfs/032 |   11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > 
> > diff --git a/tests/xfs/032 b/tests/xfs/032
> > index 75edf0e9c7268d..52d66ea182d47e 100755
> > --- a/tests/xfs/032
> > +++ b/tests/xfs/032
> > @@ -25,6 +25,17 @@ IMGFILE=$TEST_DIR/${seq}_copy.img
> >  
> >  echo "Silence is golden."
> >  
> > +# Can we mount blocksize > pagesize filesystems?
> > +for ((blocksize = PAGESIZE; blocksize <= 65536; blocksize *= 2)); do
> > +	_scratch_mkfs -b size=$blocksize -d size=1g >> $seqres.full 2>&1 || \
> > +		continue
> > +
> > +	_try_scratch_mount || continue
> > +	mounted_blocksize="$(stat -f -c '%S' $SCRATCH_MNT)"
> 
> _get_block_size $SCRATCH_MNT

Fixed, thanks.

> > +	_scratch_unmount
> > +	test "$blocksize" -eq "$mounted_blocksize" && PAGESIZE=$blocksize
> > +done
> 
> I'm wondering if we can have a helper likes _has_lbs_support(), if it
> returns 0, then set PAGESIZE to 65536 directly? (and we'd better to
> change name of PAGESIZE, e.g. MAX_BLOCKSIZE)

I suppose we could, though how do we detect large block size support?
If it's just mkfs+mount then that's not a lot better than the loop that
exists now.

Another approach might be to change the loop to:

while [ $SECTORSIZE -le 65536 ]; do
	while [ $BLOCKSIZE -le 65536 ]; do
		...
	done
done

But break out of the loop if _scratch_mount fails and BLOCKSIZE >
PAGESIZE?  Then we don't need the detector loop.

--D

> Thanks,
> Zorro
> 
> > +
> >  do_copy()
> >  {
> >  	local opts="$*"
> > 
> 
> 

  reply	other threads:[~2025-01-06 18:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04  3:45 [PATCHSET v3] fstests: random fixes for v2024.12.01 Darrick J. Wong
2024-12-04  3:45 ` [PATCH 1/2] xfs/032: try running on blocksize > pagesize filesystems Darrick J. Wong
2024-12-22 12:44   ` Zorro Lang
2025-01-06 18:13     ` Darrick J. Wong [this message]
2024-12-04  3:46 ` [PATCH 2/2] xfs/43[4-6]: implement impatient module reloading Darrick J. Wong
2024-12-22 13:17   ` Zorro Lang
2024-12-19 17:27 ` [PATCHSET v3] fstests: random fixes for v2024.12.01 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=20250106181322.GE6174@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --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