From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id BFBE07F52 for ; Wed, 23 Apr 2014 15:02:11 -0500 (CDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by relay2.corp.sgi.com (Postfix) with ESMTP id 8338330405F for ; Wed, 23 Apr 2014 13:02:11 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by cuda.sgi.com with ESMTP id cjAKK8o5Sz9R0cV5 for ; Wed, 23 Apr 2014 13:02:09 -0700 (PDT) Date: Wed, 23 Apr 2014 16:02:06 -0400 From: Brian Foster Subject: Re: [PATCH v3 13/20] xfsprogs/repair: account for finobt in ag 0 geometry pre-calculation Message-ID: <20140423200205.GE5225@bfoster.bfoster> References: <1397146270-42993-1-git-send-email-bfoster@redhat.com> <1397146270-42993-14-git-send-email-bfoster@redhat.com> <20140423061233.GN15995@dastard> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140423061233.GN15995@dastard> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Dave Chinner Cc: xfs@oss.sgi.com 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 > > --- > > 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@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs