From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Zorro Lang <zlang@redhat.com>, xfs <linux-xfs@vger.kernel.org>,
fstests <fstests@vger.kernel.org>
Subject: Re: [RFC PATCH] fstests: test fix for an agbno overflow in __xfs_getfsmap_datadev
Date: Mon, 28 Aug 2023 12:00:59 +1000 [thread overview]
Message-ID: <ZOv/25JEPQblNx1n@dread.disaster.area> (raw)
In-Reply-To: <20230827155646.GA28202@frogsfrogsfrogs>
On Sun, Aug 27, 2023 at 08:56:46AM -0700, Darrick J. Wong wrote:
> On Sun, Aug 27, 2023 at 09:06:44PM +0800, Zorro Lang wrote:
> > On Tue, Aug 22, 2023 at 06:02:39PM -0700, Darrick J. Wong wrote:
> > > From: Darrick J. Wong <djwong@kernel.org>
> > >
> > > Dave Chinner reported that xfs/273 fails if the AG size happens to be an
> > > exact power of two. I traced this to an agbno integer overflow when the
> > > current GETFSMAP call is a continuation of a previous GETFSMAP call, and
> > > the last record returned was non-shareable space at the end of an AG.
> > >
> > > This is the regression test for that bug.
> > >
> > > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
.....
> > > +echo "desired asize=$desired_agsize" >> $seqres.full
> > > +_scratch_mkfs -d "agsize=${desired_agsize}b" | _filter_mkfs 2> $tmp.mkfs >> $seqres.full
> > > +source $tmp.mkfs
> > > +
> > > +test "$desired_agsize" -eq "$agsize" || _notrun "wanted agsize=$desired_agsize, got $agsize"
> > > +
> > > +_scratch_mount
> > > +$XFS_IO_PROG -c 'fsmap -n 1024 -v' $SCRATCH_MNT >> $tmp.big
> > > +$XFS_IO_PROG -c 'fsmap -n 1 -v' $SCRATCH_MNT >> $tmp.small
> >
> > This line reports:
> >
> > xfs_io: xfsctl(XFS_IOC_GETFSMAP) iflags=0x0 ["/mnt/xfstests/scratch"]: Invalid argument
> >
> > when the test case fails. Is that normal?
>
> Yes. The attached bugfix should make that go away.
The kernel bug fix fixes the same problem with xfs/273; I haven't
tested this specific new regression test.
-Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2023-08-28 2:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230823010046.GD11286@frogsfrogsfrogs>
2023-08-23 1:02 ` [RFC PATCH] fstests: test fix for an agbno overflow in __xfs_getfsmap_datadev Darrick J. Wong
2023-08-24 2:36 ` Dave Chinner
2023-08-24 3:19 ` Darrick J. Wong
2023-08-24 3:42 ` Dave Chinner
2023-08-27 13:06 ` Zorro Lang
2023-08-27 15:56 ` Darrick J. Wong
2023-08-28 2:00 ` Dave Chinner [this message]
2023-08-28 14:24 ` Zorro Lang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZOv/25JEPQblNx1n@dread.disaster.area \
--to=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox