From: Lachlan McIlroy <lmcilroy@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 4/4] xfs: obey minleft values during extent allocation correctly.
Date: Thu, 21 Apr 2011 09:48:53 -0400 (EDT) [thread overview]
Message-ID: <1979654581.175163.1303393733462.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> (raw)
In-Reply-To: <20110421065312.GI1814@dastard>
----- Original Message -----
> On Thu, Apr 21, 2011 at 01:05:18AM -0400, Lachlan McIlroy wrote:
> > ----- Original Message -----
> > > From: Dave Chinner <dchinner@redhat.com>
> > >
> > > When allocating an extent that is long enough to consume the
> > > remaining free space in an AG, we need to ensure that the
> > > allocation
> > > leaves enough space in the AG for any subsequent bmap btree blocks
> > > that are needed to track the new extent. These have to be
> > > allocated
> > > in the same AG as we only reserve enough blocks in an allocation
> > > transaction for modification of the freespace trees in a single
> > > AG.
> > >
> > > xfs_alloc_fix_minleft() has been considering blocks on the AGFL as
> > > free blocks available for extent and bmbt block allocation, which
> > > is
> > > not correct - blocks on the AGFL are there exclusively for the use
> > > of the free space btrees. As a result, when minleft is less than
> > > the
> > > number of blocks on the AGFL, xfs_alloc_fix_minleft() does not
> > > trim
> > > the given extent to leave minleft blocks available for bmbt
> > > allocation, and hence we can fail allocation during bmbt record
> > > insertion.
> > >
> > > A further problem is that bmbt block allocation doesn't set the
> > > total number of blocks correctly for the allocation, thereby
> > > allowing it to allocate a block from the AGFL before failing on
> > > the
> > > second block in xfs_alloc_fix_freelist(). The total needs to be
> > > set
> > > so that it skips AGs that only have the minimum reserved
> > > amount of AGFL blocks free in them.
> > >
> > > Similarly, xfs_inobt_alloc_block() needs to set args->total as
> > > well.
> >
> > Dave, you seem to have dropped the args->total changes?
>
> yeah I did - I forgot to update the commit message. It passes test
> 250 without the args.total changes, so I figured that the minimum
> change needed was the best approach. I'll fix the commit message.
Yes I agree, best to keep the change to a minimum. Perhaps we need
another test case that exhausts almost all space in all AGs to
demonstrate the need for the args->total change (and ensure that
the low space algorithm gets triggered).
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-04-21 13:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 4:29 [PATCH 0/4] xfs: candidate fixes for 2.6.39-rc4 Dave Chinner
2011-04-21 4:29 ` [PATCH 1/4] xfs: fix xfs_itruncate_start tracing Dave Chinner
2011-04-21 4:29 ` [PATCH 2/4] xfs: don't look forever in xfs_inode_ag_walk during async inode flushes Dave Chinner
2011-04-21 4:29 ` [PATCH 3/4] xfs: reset buffer pointers before freeing them Dave Chinner
2011-04-21 4:52 ` Christoph Hellwig
2011-04-21 6:53 ` Dave Chinner
2011-04-21 4:29 ` [PATCH 4/4] xfs: obey minleft values during extent allocation correctly Dave Chinner
2011-04-21 4:44 ` Christoph Hellwig
2011-04-21 5:05 ` Lachlan McIlroy
2011-04-21 6:53 ` Dave Chinner
2011-04-21 13:48 ` Lachlan McIlroy [this message]
2011-04-21 20:48 ` [PATCH 0/4] xfs: candidate fixes for 2.6.39-rc4 Alex Elder
-- strict thread matches above, loose matches on Subject: below --
2011-04-21 9:34 [PATCH 0/4] xfs: candidate fixes for 2.6.39-rc4 v2 Dave Chinner
2011-04-21 9:34 ` [PATCH 4/4] xfs: obey minleft values during extent allocation correctly Dave Chinner
2011-04-29 1:51 ` Dave Chinner
2011-04-29 6:25 ` Christoph Hellwig
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=1979654581.175163.1303393733462.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com \
--to=lmcilroy@redhat.com \
--cc=david@fromorbit.com \
--cc=xfs@oss.sgi.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