diff mbox series

[01/17] xfs/177: force a small file system size

Message ID 20250312064541.664334-2-hch@lst.de (mailing list archive)
State New
Headers show
Series [01/17] xfs/177: force a small file system size | expand

Commit Message

Christoph Hellwig March 12, 2025, 6:44 a.m. UTC
This test make assumptions about the number of metadata inodes.  When
using small realtime group size (e.g. the customary 256MB for SMR
hard drives) this assumption gets violated even with modest file system
size.  Force a small file system size to side-step this issue.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/xfs/177 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Darrick J. Wong March 12, 2025, 7:56 p.m. UTC | #1
On Wed, Mar 12, 2025 at 07:44:53AM +0100, Christoph Hellwig wrote:
> This test make assumptions about the number of metadata inodes.  When
> using small realtime group size (e.g. the customary 256MB for SMR
> hard drives) this assumption gets violated even with modest file system
> size.  Force a small file system size to side-step this issue.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  tests/xfs/177 | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/177 b/tests/xfs/177
> index 82b3ca264140..8d23f66d51b7 100755
> --- a/tests/xfs/177
> +++ b/tests/xfs/177
> @@ -77,7 +77,9 @@ delay_centisecs="$(cat "$xfs_centisecs_file")"
>  sleep_seconds=$(( ( (99 + (delay_centisecs / 6) ) / 100) + 1))
>  echo "Will sleep $sleep_seconds seconds to expire inodes" >> $seqres.full
>  
> -_scratch_mkfs >> $seqres.full
> +# Force a relatively small file system size to keep the number of rtgroups
> +# and thus metadata inodes low
> +_scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full

I guess that works... will try it out overnight and see what happens.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

>  _scratch_mount >> $seqres.full
>  
>  junkdir=$SCRATCH_MNT/$seq.junk
> -- 
> 2.45.2
> 
>
diff mbox series

Patch

diff --git a/tests/xfs/177 b/tests/xfs/177
index 82b3ca264140..8d23f66d51b7 100755
--- a/tests/xfs/177
+++ b/tests/xfs/177
@@ -77,7 +77,9 @@  delay_centisecs="$(cat "$xfs_centisecs_file")"
 sleep_seconds=$(( ( (99 + (delay_centisecs / 6) ) / 100) + 1))
 echo "Will sleep $sleep_seconds seconds to expire inodes" >> $seqres.full
 
-_scratch_mkfs >> $seqres.full
+# Force a relatively small file system size to keep the number of rtgroups
+# and thus metadata inodes low
+_scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full
 _scratch_mount >> $seqres.full
 
 junkdir=$SCRATCH_MNT/$seq.junk