xfs
[Top] [All Lists]

Re: [PATCH 13/20] xfs: rmap btree requires more reserved free space

To: Brian Foster <bfoster@xxxxxxxxxx>
Subject: Re: [PATCH 13/20] xfs: rmap btree requires more reserved free space
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 10 Jul 2015 10:37:44 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20150625164103.GC36162@xxxxxxxxxxxxxxx>
References: <1433311497-10245-1-git-send-email-david@xxxxxxxxxxxxx> <1433311497-10245-14-git-send-email-david@xxxxxxxxxxxxx> <20150625164103.GC36162@xxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Jun 25, 2015 at 12:41:04PM -0400, Brian Foster wrote:
> On Wed, Jun 03, 2015 at 04:04:50PM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > The rmap btree is allocated from the AGFL, which means we have to
> > ensure ENOSPC is reported to userspace before we run out of free
> > space in each AG. The last allocation in an AG can cause a full
> > height rmap btree split, and that means we have to reserve at least
> > this many blocks *in each AG* to be placed on the AGFL at ENOSPC.
> > Update the various space calculation functiosn to handle this.
> > 
> > Also, because the macros are now executing conditional code and are called 
> > quite
> > frequently, convert them to functions that initialise varaibles in the 
> > struct
> > xfs_mount, use the new variables everywhere and document the calculations
> > better.
> > 
> > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
.....
> > + * so we set the number of set-aside blocks to 4 + 4*agcount when not 
> > using rmap
> > + * btrees.
> > + *
> > + * When rmap btrees are active, we have to consider that using the last 
> > block in
> > + * the AG can cause a full height rmap btree split and we need enough 
> > blocks on
> > + * the AGFL to be able to handle this. That means we have, in addition to 
> > the
> > + * above consideration, another (2 * mp->m_ag_levels) - 1 blocks required 
> > to be
> > + * available to the free list.
> > + */
> 
> BTW, I think I get the 2 block per level log requirement in that a split
> requires logging the two blocks involved. Where does the 2nd block per
> level come in as an allocation requirement?

Yup, you are right, I've mixed the two conditions up. Split only
requires an extra block per level, plus a new root block. e.g. see
xfs_alloc_min_freelist()...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH 13/20] xfs: rmap btree requires more reserved free space, Dave Chinner <=