xfs
[Top] [All Lists]

Re: [PATCH v3 13/20] xfsprogs/repair: account for finobt in ag 0 geometr

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH v3 13/20] xfsprogs/repair: account for finobt in ag 0 geometry pre-calculation
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Wed, 23 Apr 2014 16:02:06 -0400
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140423061233.GN15995@dastard>
References: <1397146270-42993-1-git-send-email-bfoster@xxxxxxxxxx> <1397146270-42993-14-git-send-email-bfoster@xxxxxxxxxx> <20140423061233.GN15995@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Apr 23, 2014 at 04:12:33PM +1000, Dave Chinner wrote:
> On Thu, Apr 10, 2014 at 12:11:03PM -0400, Brian Foster wrote:
> > Account for the finobt in calc_mkfs().
> > 
> > Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
> > ---
> >  repair/xfs_repair.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
> > index 08b25f0..356125b 100644
> > --- a/repair/xfs_repair.c
> > +++ b/repair/xfs_repair.c
> > @@ -407,6 +407,8 @@ calc_mkfs(xfs_mount_t *mp)
> >     bcntbt_root = bnobt_root + 1;
> >     inobt_root = bnobt_root + 2;
> >     fino_bno = inobt_root + XFS_MIN_FREELIST_RAW(1, 1, mp) + 1;
> > +   if (xfs_sb_version_hasfinobt(&mp->m_sb))
> > +           fino_bno++;
> 
> The comment about this code needs updating, too.
> 

Oops, indeed. How about the following (also fixed the line length)?

        /*                                                                      
         * Pre-calculate the geometry of ag 0. We know what it looks like
         * because we know what mkfs does: 2 allocation btree roots (by block
         * and by size), the inode allocation btree root, the free inode
         * allocation btree root (if enabled) and some number of blocks to
         * prefill the agfl.                                                    
         */

Brian

> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>