From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org, zlang@redhat.com
Subject: Re: [PATCH] [RFC] xfs: fix inode fork extent count overflow
Date: Tue, 17 Sep 2019 08:00:09 +1000 [thread overview]
Message-ID: <20190916220009.GA16973@dread.disaster.area> (raw)
In-Reply-To: <20190916162005.GX2229799@magnolia>
On Mon, Sep 16, 2019 at 09:20:05AM -0700, Darrick J. Wong wrote:
> On Wed, Sep 11, 2019 at 11:21:07AM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> > And that's the behaviour I just saw in a nutshell. The on disk count
> > is correct, but once the tree is loaded into memory, it goes whacky.
> > Clearly there's something wrong with xfs_iext_count():
> >
> > inline xfs_extnum_t xfs_iext_count(struct xfs_ifork *ifp)
> > {
> > return ifp->if_bytes / sizeof(struct xfs_iext_rec);
> > }
> >
> > Simple enough, but 134M extents is 2**27, and that's right about
>
> On the plus side, 2^27 is way better than the last time anyone tried to
> create an egregious number of extents.
Well, we'd get to 2^26 (~65M extents) before memory allocation
stopped progress...
> > Current testing is at over 500M extents and still going:
> >
> > fsxattr.nextents = 517310478
> >
> > Reported-by: Zorro Lang <zlang@redhat.com>
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
>
> Looks reasonable to me; did Zorro retest w/ this patch?
No idea, but I got to 1.3B extents before the VM ran out of RAM and
oom-killed itself to death - the extent list took up >47GB of the
48GB of RAM I gave the VM. At some point we are going to have to
think about demand paging extent lists....
> If so,
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Thanks!
-Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2019-09-16 22:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 1:21 [PATCH] [RFC] xfs: fix inode fork extent count overflow Dave Chinner
2019-09-11 10:55 ` Christoph Hellwig
2019-09-12 1:08 ` Dave Chinner
2019-09-18 16:46 ` Christoph Hellwig
2019-09-16 16:20 ` Darrick J. Wong
2019-09-16 17:22 ` Zorro Lang
2019-09-16 22:00 ` Dave Chinner [this message]
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=20190916220009.GA16973@dread.disaster.area \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.com \
--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