diff mbox series

[v3,4/4] xfs/144: remove testing root dir inode in AG 1

Message ID 20220830044433.1719246-5-jencce.kernel@gmail.com (mailing list archive)
State Deferred, archived
Headers show
Series tweaks for denying tiny xfs | expand

Commit Message

Murphy Zhou Aug. 30, 2022, 4:44 a.m. UTC
Since this xfsprogs commit
  1b580a773 mkfs: don't let internal logs bump the root dir inode chunk to AG 1
this operation is not allowed.

Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
---
 tests/xfs/144 | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

Comments

Zorro Lang Aug. 30, 2022, 7:49 a.m. UTC | #1
On Tue, Aug 30, 2022 at 12:44:33PM +0800, Murphy Zhou wrote:
> Since this xfsprogs commit
>   1b580a773 mkfs: don't let internal logs bump the root dir inode chunk to AG 1
> this operation is not allowed.
> 
> Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
> ---
>  tests/xfs/144 | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/tests/xfs/144 b/tests/xfs/144
> index 706aff61..3f80d0ee 100755
> --- a/tests/xfs/144
> +++ b/tests/xfs/144
> @@ -17,9 +17,6 @@ _begin_fstest auto mkfs
>  _supported_fs xfs
>  _require_test
>  
> -# The last testcase creates a (sparse) fs image with a 2GB log, so we need
> -# 3GB to avoid failing the mkfs due to ENOSPC.
> -_require_fs_space $TEST_DIR $((3 * 1048576))
>  echo Silence is golden
>  
>  testfile=$TEST_DIR/a
> @@ -36,7 +33,7 @@ test_format() {
>  }
>  
>  # First we try various small filesystems and stripe sizes.
> -for M in `seq 298 302` `seq 490 520`; do
> +for M in `seq 1024 1030` ; do

Can `seq 1024 1030` replace `seq 298 302` `seq 490 520`? I don't know how
Darrick choose these numbers, better to ask the original authoer of this
case. Others looks reasonable for me.

Thanks,
Zorro

>  	for S in `seq 32 4 64`; do
>  		test_format "M=$M S=$S" -dsu=${S}k,sw=1,size=${M}m -N
>  	done
> @@ -45,11 +42,6 @@ done
>  # log end rounded beyond EOAG due to stripe unit
>  test_format "log end beyond eoag" -d agcount=3200,size=6366g -d su=256k,sw=4 -N
>  
> -# Log so large it pushes the root dir into AG 1.  We can't use -N for the mkfs
> -# because this check only occurs after the root directory has been allocated,
> -# which mkfs -N doesn't do.
> -test_format "log pushes rootdir into AG 1" -d agcount=3200,size=6366g -lagnum=0
> -
>  # success, all done
>  status=0
>  exit
> -- 
> 2.31.1
>
Darrick J. Wong Aug. 30, 2022, 2:59 p.m. UTC | #2
On Tue, Aug 30, 2022 at 03:49:36PM +0800, Zorro Lang wrote:
> On Tue, Aug 30, 2022 at 12:44:33PM +0800, Murphy Zhou wrote:
> > Since this xfsprogs commit
> >   1b580a773 mkfs: don't let internal logs bump the root dir inode chunk to AG 1
> > this operation is not allowed.
> > 
> > Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
> > ---
> >  tests/xfs/144 | 10 +---------
> >  1 file changed, 1 insertion(+), 9 deletions(-)
> > 
> > diff --git a/tests/xfs/144 b/tests/xfs/144
> > index 706aff61..3f80d0ee 100755
> > --- a/tests/xfs/144
> > +++ b/tests/xfs/144
> > @@ -17,9 +17,6 @@ _begin_fstest auto mkfs
> >  _supported_fs xfs
> >  _require_test
> >  
> > -# The last testcase creates a (sparse) fs image with a 2GB log, so we need
> > -# 3GB to avoid failing the mkfs due to ENOSPC.
> > -_require_fs_space $TEST_DIR $((3 * 1048576))
> >  echo Silence is golden
> >  
> >  testfile=$TEST_DIR/a
> > @@ -36,7 +33,7 @@ test_format() {
> >  }
> >  
> >  # First we try various small filesystems and stripe sizes.
> > -for M in `seq 298 302` `seq 490 520`; do
> > +for M in `seq 1024 1030` ; do
> 
> Can `seq 1024 1030` replace `seq 298 302` `seq 490 520`? I don't know how
> Darrick choose these numbers, better to ask the original authoer of this
> case. Others looks reasonable for me.

Those sequences were a result of Eric prying broken edge-cases out of
the original patch series, so I wired them up in the test.

> Thanks,
> Zorro
> 
> >  	for S in `seq 32 4 64`; do
> >  		test_format "M=$M S=$S" -dsu=${S}k,sw=1,size=${M}m -N
> >  	done
> > @@ -45,11 +42,6 @@ done
> >  # log end rounded beyond EOAG due to stripe unit
> >  test_format "log end beyond eoag" -d agcount=3200,size=6366g -d su=256k,sw=4 -N
> >  
> > -# Log so large it pushes the root dir into AG 1.  We can't use -N for the mkfs
> > -# because this check only occurs after the root directory has been allocated,
> > -# which mkfs -N doesn't do.
> > -test_format "log pushes rootdir into AG 1" -d agcount=3200,size=6366g -lagnum=0

Also, why remove this bit?  Surely we ought to keep it just in case
someone accidentally breaks the mkfs code again?

--D

> >  # success, all done
> >  status=0
> >  exit
> > -- 
> > 2.31.1
> > 
>
Murphy Zhou Aug. 30, 2022, 11:42 p.m. UTC | #3
On Tue, Aug 30, 2022 at 3:49 PM Zorro Lang <zlang@redhat.com> wrote:
>
> On Tue, Aug 30, 2022 at 12:44:33PM +0800, Murphy Zhou wrote:
> > Since this xfsprogs commit
> >   1b580a773 mkfs: don't let internal logs bump the root dir inode chunk to AG 1
> > this operation is not allowed.
> >
> > Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
> > ---
> >  tests/xfs/144 | 10 +---------
> >  1 file changed, 1 insertion(+), 9 deletions(-)
> >
> > diff --git a/tests/xfs/144 b/tests/xfs/144
> > index 706aff61..3f80d0ee 100755
> > --- a/tests/xfs/144
> > +++ b/tests/xfs/144
> > @@ -17,9 +17,6 @@ _begin_fstest auto mkfs
> >  _supported_fs xfs
> >  _require_test
> >
> > -# The last testcase creates a (sparse) fs image with a 2GB log, so we need
> > -# 3GB to avoid failing the mkfs due to ENOSPC.
> > -_require_fs_space $TEST_DIR $((3 * 1048576))
> >  echo Silence is golden
> >
> >  testfile=$TEST_DIR/a
> > @@ -36,7 +33,7 @@ test_format() {
> >  }
> >
> >  # First we try various small filesystems and stripe sizes.
> > -for M in `seq 298 302` `seq 490 520`; do
> > +for M in `seq 1024 1030` ; do
>
> Can `seq 1024 1030` replace `seq 298 302` `seq 490 520`? I don't know how
> Darrick choose these numbers, better to ask the original authoer of this
> case. Others looks reasonable for me.

Oh, they are needed for fs size reason and log size reason during my test.

Forgot to move this part of patch to the fs size one.
>
> Thanks,
> Zorro
>
> >       for S in `seq 32 4 64`; do
> >               test_format "M=$M S=$S" -dsu=${S}k,sw=1,size=${M}m -N
> >       done
> > @@ -45,11 +42,6 @@ done
> >  # log end rounded beyond EOAG due to stripe unit
> >  test_format "log end beyond eoag" -d agcount=3200,size=6366g -d su=256k,sw=4 -N
> >
> > -# Log so large it pushes the root dir into AG 1.  We can't use -N for the mkfs
> > -# because this check only occurs after the root directory has been allocated,
> > -# which mkfs -N doesn't do.
> > -test_format "log pushes rootdir into AG 1" -d agcount=3200,size=6366g -lagnum=0
> > -
> >  # success, all done
> >  status=0
> >  exit
> > --
> > 2.31.1
> >
>
Murphy Zhou Aug. 30, 2022, 11:45 p.m. UTC | #4
On Tue, Aug 30, 2022 at 10:59 PM Darrick J. Wong <djwong@kernel.org> wrote:
>
> On Tue, Aug 30, 2022 at 03:49:36PM +0800, Zorro Lang wrote:
> > On Tue, Aug 30, 2022 at 12:44:33PM +0800, Murphy Zhou wrote:
> > > Since this xfsprogs commit
> > >   1b580a773 mkfs: don't let internal logs bump the root dir inode chunk to AG 1
> > > this operation is not allowed.
> > >
> > > Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
> > > ---
> > >  tests/xfs/144 | 10 +---------
> > >  1 file changed, 1 insertion(+), 9 deletions(-)
> > >
> > > diff --git a/tests/xfs/144 b/tests/xfs/144
> > > index 706aff61..3f80d0ee 100755
> > > --- a/tests/xfs/144
> > > +++ b/tests/xfs/144
> > > @@ -17,9 +17,6 @@ _begin_fstest auto mkfs
> > >  _supported_fs xfs
> > >  _require_test
> > >
> > > -# The last testcase creates a (sparse) fs image with a 2GB log, so we need
> > > -# 3GB to avoid failing the mkfs due to ENOSPC.
> > > -_require_fs_space $TEST_DIR $((3 * 1048576))
> > >  echo Silence is golden
> > >
> > >  testfile=$TEST_DIR/a
> > > @@ -36,7 +33,7 @@ test_format() {
> > >  }
> > >
> > >  # First we try various small filesystems and stripe sizes.
> > > -for M in `seq 298 302` `seq 490 520`; do
> > > +for M in `seq 1024 1030` ; do
> >
> > Can `seq 1024 1030` replace `seq 298 302` `seq 490 520`? I don't know how
> > Darrick choose these numbers, better to ask the original authoer of this
> > case. Others looks reasonable for me.
>
> Those sequences were a result of Eric prying broken edge-cases out of
> the original patch series, so I wired them up in the test.
>
> > Thanks,
> > Zorro
> >
> > >     for S in `seq 32 4 64`; do
> > >             test_format "M=$M S=$S" -dsu=${S}k,sw=1,size=${M}m -N
> > >     done
> > > @@ -45,11 +42,6 @@ done
> > >  # log end rounded beyond EOAG due to stripe unit
> > >  test_format "log end beyond eoag" -d agcount=3200,size=6366g -d su=256k,sw=4 -N
> > >
> > > -# Log so large it pushes the root dir into AG 1.  We can't use -N for the mkfs
> > > -# because this check only occurs after the root directory has been allocated,
> > > -# which mkfs -N doesn't do.
> > > -test_format "log pushes rootdir into AG 1" -d agcount=3200,size=6366g -lagnum=0
>
> Also, why remove this bit?  Surely we ought to keep it just in case
> someone accidentally breaks the mkfs code again?

Because of this:
  1b580a773 mkfs: don't let internal logs bump the root dir inode chunk to AG 1
mkfs will fail here.

How can we achieve that? Add an expected result for _test_format?

THanks,
>
> --D
>
> > >  # success, all done
> > >  status=0
> > >  exit
> > > --
> > > 2.31.1
> > >
> >
diff mbox series

Patch

diff --git a/tests/xfs/144 b/tests/xfs/144
index 706aff61..3f80d0ee 100755
--- a/tests/xfs/144
+++ b/tests/xfs/144
@@ -17,9 +17,6 @@  _begin_fstest auto mkfs
 _supported_fs xfs
 _require_test
 
-# The last testcase creates a (sparse) fs image with a 2GB log, so we need
-# 3GB to avoid failing the mkfs due to ENOSPC.
-_require_fs_space $TEST_DIR $((3 * 1048576))
 echo Silence is golden
 
 testfile=$TEST_DIR/a
@@ -36,7 +33,7 @@  test_format() {
 }
 
 # First we try various small filesystems and stripe sizes.
-for M in `seq 298 302` `seq 490 520`; do
+for M in `seq 1024 1030` ; do
 	for S in `seq 32 4 64`; do
 		test_format "M=$M S=$S" -dsu=${S}k,sw=1,size=${M}m -N
 	done
@@ -45,11 +42,6 @@  done
 # log end rounded beyond EOAG due to stripe unit
 test_format "log end beyond eoag" -d agcount=3200,size=6366g -d su=256k,sw=4 -N
 
-# Log so large it pushes the root dir into AG 1.  We can't use -N for the mkfs
-# because this check only occurs after the root directory has been allocated,
-# which mkfs -N doesn't do.
-test_format "log pushes rootdir into AG 1" -d agcount=3200,size=6366g -lagnum=0
-
 # success, all done
 status=0
 exit