From: Lachlan McIlroy <lachlan@sgi.com>
To: Lachlan McIlroy <lachlan@sgi.com>, xfs-dev <xfs-dev@sgi.com>,
xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH 1/2] set minleft in xfs_bmbt_split()
Date: Tue, 24 Jun 2008 15:22:03 +1000 [thread overview]
Message-ID: <4860847B.7070703@sgi.com> (raw)
In-Reply-To: <20080624045841.GN16257@build-svl-1.agami.com>
Dave Chinner wrote:
> On Tue, Jun 24, 2008 at 12:09:08PM +1000, Lachlan McIlroy wrote:
>> The bmap btree split code relies on a previous data extent allocation
>> (from xfs_bmap_btalloc()) to find an AG that has sufficient space
>> to perform a full btree split, when inserting the extent. When
>> converting unwritten extents we don't allocate a data extent so a
>> btree split will be the first allocation. In this case we need to
>> set minleft so the allocator will pick an AG that has space to
>> complete the split(s).
>
> looks good, execpt...
>
>> Lachlan
>>
>> --- 2.6.x-agno2.orig/fs/xfs/xfs_bmap_btree.c
>> +++ 2.6.x-agno2/fs/xfs/xfs_bmap_btree.c
>> @@ -1493,12 +1493,20 @@ xfs_bmbt_split(
>> left = XFS_BUF_TO_BMBT_BLOCK(lbp);
>> args.fsbno = cur->bc_private.b.firstblock;
>> args.firstblock = args.fsbno;
>> + args.minleft = 0;
>> if (args.fsbno == NULLFSBLOCK) {
>> args.fsbno = lbno;
>> args.type = XFS_ALLOCTYPE_START_BNO;
>> + /*
>> + * Make sure there is sufficient room left in the AG to
>> + * complete a full tree split for an extent insert. If
>> + * we are converting the middle part of an extent then
>> + * we may need space for two tree splits.
>> + */
>> + args.minleft = xfs_trans_get_block_res(args.tp);
>
> I'd mention in this comment that transaction reservation needs to
> take this specifically into account.
How would transaction reservation take this into account? Are you
implying they could do something different if they knew about this
fix?
> It is probably also worth
> adding a matching comment to xfs_iomap_write_unwritten() where
> the double reservation is done (i.e. explain the magic "<< 1").
>
Will do.
next prev parent reply other threads:[~2008-06-24 5:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 2:09 [PATCH 1/2] set minleft in xfs_bmbt_split() Lachlan McIlroy
2008-06-24 4:58 ` Dave Chinner
2008-06-24 5:22 ` Lachlan McIlroy [this message]
2008-06-24 5:25 ` Dave Chinner
2008-06-24 6:16 ` Lachlan McIlroy
2008-06-24 6:25 ` Dave Chinner
2008-06-24 7:10 ` Lachlan McIlroy
2008-06-24 22:45 ` Dave Chinner
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=4860847B.7070703@sgi.com \
--to=lachlan@sgi.com \
--cc=xfs-dev@sgi.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