Message ID | 173328390001.1190210.8027443083835172014.stgit@frogsfrogsfrogs (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/2] xfs/032: try running on blocksize > pagesize filesystems | expand |
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 > 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 > + _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) Thanks, Zorro > + > do_copy() > { > local opts="$*" >
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)" + _scratch_unmount + test "$blocksize" -eq "$mounted_blocksize" && PAGESIZE=$blocksize +done + do_copy() { local opts="$*"