* [PATCHSET 1/2] fstests: fix fstests for 64k fsblock size
@ 2024-10-16 23:15 Darrick J. Wong
2024-10-16 23:15 ` [PATCH 1/2] common/xfs: _notrun tests that fail due to block size < sector size Darrick J. Wong
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Darrick J. Wong @ 2024-10-16 23:15 UTC (permalink / raw)
To: djwong, zlang; +Cc: linux-xfs, fstests
Hi all,
Various patches to fstests to make 64k fsblock filesystems mostly pass.
I haven't gone back through the remaining failures (mostly quota tests)
to figure out why they fail.
If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.
This has been running on the djcloud for months with no problems. Enjoy!
Comments and questions are, as always, welcome.
--D
fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=fix-64k-blocksize
---
Commits in this patchset:
* common/xfs: _notrun tests that fail due to block size < sector size
* xfs/161: adapt the test case for LBS filesystem
---
common/xfs | 5 +++++
tests/xfs/161 | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/2] common/xfs: _notrun tests that fail due to block size < sector size
2024-10-16 23:15 [PATCHSET 1/2] fstests: fix fstests for 64k fsblock size Darrick J. Wong
@ 2024-10-16 23:15 ` Darrick J. Wong
2024-10-22 5:47 ` Christoph Hellwig
2024-10-23 4:15 ` Zorro Lang
2024-10-16 23:15 ` [PATCH 2/2] xfs/161: adapt the test case for LBS filesystem Darrick J. Wong
2024-10-17 9:32 ` [PATCHSET 1/2] fstests: fix fstests for 64k fsblock size Pankaj Raghav (Samsung)
2 siblings, 2 replies; 8+ messages in thread
From: Darrick J. Wong @ 2024-10-16 23:15 UTC (permalink / raw)
To: djwong, zlang; +Cc: linux-xfs, fstests
From: Darrick J. Wong <djwong@kernel.org>
It makes no sense to fail a test that failed to format a filesystem with
a block size smaller than the sector size since the test preconditions
are not valid.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
common/xfs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/common/xfs b/common/xfs
index 62e3100ee117a7..53d55f9907fbb0 100644
--- a/common/xfs
+++ b/common/xfs
@@ -172,6 +172,11 @@ _try_scratch_mkfs_xfs()
mkfs_status=$?
fi
+ if [ $mkfs_status -ne 0 ] && grep -q '^block size [0-9]* cannot be smaller than sector size' "$tmp.mkfserr"; then
+ errormsg="$(grep '^block size [0-9]* cannot be smaller than sector size' "$tmp.mkfserr" | head -n 1)"
+ _notrun "_scratch_mkfs_xfs: $errormsg"
+ fi
+
# output mkfs stdout and stderr
cat $tmp.mkfsstd
cat $tmp.mkfserr >&2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] common/xfs: _notrun tests that fail due to block size < sector size
2024-10-16 23:15 ` [PATCH 1/2] common/xfs: _notrun tests that fail due to block size < sector size Darrick J. Wong
@ 2024-10-22 5:47 ` Christoph Hellwig
2024-10-23 4:15 ` Zorro Lang
1 sibling, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2024-10-22 5:47 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests
On Wed, Oct 16, 2024 at 04:15:16PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> It makes no sense to fail a test that failed to format a filesystem with
> a block size smaller than the sector size since the test preconditions
> are not valid.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] common/xfs: _notrun tests that fail due to block size < sector size
2024-10-16 23:15 ` [PATCH 1/2] common/xfs: _notrun tests that fail due to block size < sector size Darrick J. Wong
2024-10-22 5:47 ` Christoph Hellwig
@ 2024-10-23 4:15 ` Zorro Lang
1 sibling, 0 replies; 8+ messages in thread
From: Zorro Lang @ 2024-10-23 4:15 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs, fstests
On Wed, Oct 16, 2024 at 04:15:16PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> It makes no sense to fail a test that failed to format a filesystem with
> a block size smaller than the sector size since the test preconditions
> are not valid.
>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
Makes sense to me,
Reviewed-by: Zorro Lang <zlang@redhat.com>
> common/xfs | 5 +++++
> 1 file changed, 5 insertions(+)
>
>
> diff --git a/common/xfs b/common/xfs
> index 62e3100ee117a7..53d55f9907fbb0 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -172,6 +172,11 @@ _try_scratch_mkfs_xfs()
> mkfs_status=$?
> fi
>
> + if [ $mkfs_status -ne 0 ] && grep -q '^block size [0-9]* cannot be smaller than sector size' "$tmp.mkfserr"; then
> + errormsg="$(grep '^block size [0-9]* cannot be smaller than sector size' "$tmp.mkfserr" | head -n 1)"
> + _notrun "_scratch_mkfs_xfs: $errormsg"
> + fi
> +
> # output mkfs stdout and stderr
> cat $tmp.mkfsstd
> cat $tmp.mkfserr >&2
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] xfs/161: adapt the test case for LBS filesystem
2024-10-16 23:15 [PATCHSET 1/2] fstests: fix fstests for 64k fsblock size Darrick J. Wong
2024-10-16 23:15 ` [PATCH 1/2] common/xfs: _notrun tests that fail due to block size < sector size Darrick J. Wong
@ 2024-10-16 23:15 ` Darrick J. Wong
2024-10-22 5:48 ` Christoph Hellwig
2024-10-23 4:23 ` Zorro Lang
2024-10-17 9:32 ` [PATCHSET 1/2] fstests: fix fstests for 64k fsblock size Pankaj Raghav (Samsung)
2 siblings, 2 replies; 8+ messages in thread
From: Darrick J. Wong @ 2024-10-16 23:15 UTC (permalink / raw)
To: djwong, zlang; +Cc: linux-xfs, fstests
From: Pankaj Raghav <p.raghav@samsung.com>
This test fails for >= 64k filesystem block size on a 4k PAGE_SIZE
system(see LBS efforts[1]). Adapt the blksz so that we create more than
one block for the testcase.
Cap the blksz to be at least 64k to retain the same behaviour as before
for smaller filesystem blocksizes.
[1] LBS effort: https://lore.kernel.org/lkml/20230915183848.1018717-1-kernel@pankajraghav.com/
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
tests/xfs/161 | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/xfs/161 b/tests/xfs/161
index 002ee7d800dcf1..948121c0569484 100755
--- a/tests/xfs/161
+++ b/tests/xfs/161
@@ -37,7 +37,11 @@ _scratch_xfs_db -c 'version' -c 'sb 0' -c 'p' >> $seqres.full
_scratch_mount >> $seqres.full
-blksz=$(_get_file_block_size "$SCRATCH_MNT")
+min_blksz=65536
+file_blksz=$(_get_file_block_size "$SCRATCH_MNT")
+blksz=$(( 2 * $file_blksz))
+
+blksz=$(( blksz > min_blksz ? blksz : min_blksz ))
# Write more than one block to exceed the soft block quota limit via
# xfs_quota.
filesz=$(( 2 * $blksz))
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] xfs/161: adapt the test case for LBS filesystem
2024-10-16 23:15 ` [PATCH 2/2] xfs/161: adapt the test case for LBS filesystem Darrick J. Wong
@ 2024-10-22 5:48 ` Christoph Hellwig
2024-10-23 4:23 ` Zorro Lang
1 sibling, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2024-10-22 5:48 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] xfs/161: adapt the test case for LBS filesystem
2024-10-16 23:15 ` [PATCH 2/2] xfs/161: adapt the test case for LBS filesystem Darrick J. Wong
2024-10-22 5:48 ` Christoph Hellwig
@ 2024-10-23 4:23 ` Zorro Lang
1 sibling, 0 replies; 8+ messages in thread
From: Zorro Lang @ 2024-10-23 4:23 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs, fstests
On Wed, Oct 16, 2024 at 04:15:32PM -0700, Darrick J. Wong wrote:
> From: Pankaj Raghav <p.raghav@samsung.com>
>
> This test fails for >= 64k filesystem block size on a 4k PAGE_SIZE
> system(see LBS efforts[1]). Adapt the blksz so that we create more than
> one block for the testcase.
>
> Cap the blksz to be at least 64k to retain the same behaviour as before
> for smaller filesystem blocksizes.
>
> [1] LBS effort: https://lore.kernel.org/lkml/20230915183848.1018717-1-kernel@pankajraghav.com/
>
> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
> tests/xfs/161 | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
>
> diff --git a/tests/xfs/161 b/tests/xfs/161
> index 002ee7d800dcf1..948121c0569484 100755
> --- a/tests/xfs/161
> +++ b/tests/xfs/161
> @@ -37,7 +37,11 @@ _scratch_xfs_db -c 'version' -c 'sb 0' -c 'p' >> $seqres.full
> _scratch_mount >> $seqres.full
>
>
> -blksz=$(_get_file_block_size "$SCRATCH_MNT")
> +min_blksz=65536
> +file_blksz=$(_get_file_block_size "$SCRATCH_MNT")
> +blksz=$(( 2 * $file_blksz))
> +
> +blksz=$(( blksz > min_blksz ? blksz : min_blksz ))
Just to be curious, is there any machine with pagesize bigger than 65536 :)
Reviewed-by: Zorro Lang <zlang@redhat.com>
> # Write more than one block to exceed the soft block quota limit via
> # xfs_quota.
> filesz=$(( 2 * $blksz))
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCHSET 1/2] fstests: fix fstests for 64k fsblock size
2024-10-16 23:15 [PATCHSET 1/2] fstests: fix fstests for 64k fsblock size Darrick J. Wong
2024-10-16 23:15 ` [PATCH 1/2] common/xfs: _notrun tests that fail due to block size < sector size Darrick J. Wong
2024-10-16 23:15 ` [PATCH 2/2] xfs/161: adapt the test case for LBS filesystem Darrick J. Wong
@ 2024-10-17 9:32 ` Pankaj Raghav (Samsung)
2 siblings, 0 replies; 8+ messages in thread
From: Pankaj Raghav (Samsung) @ 2024-10-17 9:32 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests
On Wed, Oct 16, 2024 at 04:15:05PM -0700, Darrick J. Wong wrote:
> Hi all,
>
> Various patches to fstests to make 64k fsblock filesystems mostly pass.
Thanks for resending xfs/161.
> I haven't gone back through the remaining failures (mostly quota tests)
> to figure out why they fail.
I am on it. I will send the patches soon.
--
Pankaj
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-10-23 4:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16 23:15 [PATCHSET 1/2] fstests: fix fstests for 64k fsblock size Darrick J. Wong
2024-10-16 23:15 ` [PATCH 1/2] common/xfs: _notrun tests that fail due to block size < sector size Darrick J. Wong
2024-10-22 5:47 ` Christoph Hellwig
2024-10-23 4:15 ` Zorro Lang
2024-10-16 23:15 ` [PATCH 2/2] xfs/161: adapt the test case for LBS filesystem Darrick J. Wong
2024-10-22 5:48 ` Christoph Hellwig
2024-10-23 4:23 ` Zorro Lang
2024-10-17 9:32 ` [PATCHSET 1/2] fstests: fix fstests for 64k fsblock size Pankaj Raghav (Samsung)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox