diff mbox series

[3/5] generic/449: always fill up the data device

Message ID 161958295276.3452351.11071488836337123863.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series fstests: miscellaneous fixes | expand

Commit Message

Darrick J. Wong April 28, 2021, 4:09 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

This is yet another one of those tests that looks at what happens when
we run out of space for more metadata (in this case, xattrs).  Make sure
that the 256M we write to the file to try to stimulate ENOSPC gets
written to the same place that xfs puts xattr data -- the data device.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 tests/generic/449 |    5 +++++
 1 file changed, 5 insertions(+)

Comments

Brian Foster April 28, 2021, 5:47 p.m. UTC | #1
On Tue, Apr 27, 2021 at 09:09:12PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> This is yet another one of those tests that looks at what happens when
> we run out of space for more metadata (in this case, xattrs).  Make sure
> that the 256M we write to the file to try to stimulate ENOSPC gets
> written to the same place that xfs puts xattr data -- the data device.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>  tests/generic/449 |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> 
> diff --git a/tests/generic/449 b/tests/generic/449
> index a2d882df..5fd15367 100755
> --- a/tests/generic/449
> +++ b/tests/generic/449
> @@ -43,6 +43,11 @@ _require_attrs trusted
>  _scratch_mkfs_sized $((256 * 1024 * 1024)) >> $seqres.full 2>&1
>  _scratch_mount || _fail "mount failed"
>  
> +# This is a test of xattr behavior when we run out of disk space for xattrs,
> +# so make sure the pwrite goes to the data device and not the rt volume.
> +test "$FSTYP" = "xfs" && \
> +	$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
> +

This seems like the type of thing we'll consistently be playing
whack-a-mole with unless we come up with a better way to manage it. I'm
not sure what the solution for that is though, so:

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  TFILE=$SCRATCH_MNT/testfile.$seq
>  
>  # Create the test file and choose its permissions
>
Darrick J. Wong April 29, 2021, 12:39 a.m. UTC | #2
On Wed, Apr 28, 2021 at 01:47:33PM -0400, Brian Foster wrote:
> On Tue, Apr 27, 2021 at 09:09:12PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > This is yet another one of those tests that looks at what happens when
> > we run out of space for more metadata (in this case, xattrs).  Make sure
> > that the 256M we write to the file to try to stimulate ENOSPC gets
> > written to the same place that xfs puts xattr data -- the data device.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > ---
> >  tests/generic/449 |    5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > 
> > diff --git a/tests/generic/449 b/tests/generic/449
> > index a2d882df..5fd15367 100755
> > --- a/tests/generic/449
> > +++ b/tests/generic/449
> > @@ -43,6 +43,11 @@ _require_attrs trusted
> >  _scratch_mkfs_sized $((256 * 1024 * 1024)) >> $seqres.full 2>&1
> >  _scratch_mount || _fail "mount failed"
> >  
> > +# This is a test of xattr behavior when we run out of disk space for xattrs,
> > +# so make sure the pwrite goes to the data device and not the rt volume.
> > +test "$FSTYP" = "xfs" && \
> > +	$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
> > +
> 
> This seems like the type of thing we'll consistently be playing
> whack-a-mole with unless we come up with a better way to manage it. I'm
> not sure what the solution for that is though, so:

I don't know either, sadly.  Most of the culprits are either
xfs-specific tests that fiddle with the disk format, or ENOSPC testers
that rely on data writes using the same space manager as metadata, or
vice versa.

--D

> Reviewed-by: Brian Foster <bfoster@redhat.com>
> 
> >  TFILE=$SCRATCH_MNT/testfile.$seq
> >  
> >  # Create the test file and choose its permissions
> > 
>
diff mbox series

Patch

diff --git a/tests/generic/449 b/tests/generic/449
index a2d882df..5fd15367 100755
--- a/tests/generic/449
+++ b/tests/generic/449
@@ -43,6 +43,11 @@  _require_attrs trusted
 _scratch_mkfs_sized $((256 * 1024 * 1024)) >> $seqres.full 2>&1
 _scratch_mount || _fail "mount failed"
 
+# This is a test of xattr behavior when we run out of disk space for xattrs,
+# so make sure the pwrite goes to the data device and not the rt volume.
+test "$FSTYP" = "xfs" && \
+	$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
+
 TFILE=$SCRATCH_MNT/testfile.$seq
 
 # Create the test file and choose its permissions