From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v2] xfsprogs: reduce bb_numrecs in bno/cnt btrees when log consumes all agf space
Date: Wed, 20 Mar 2013 06:26:38 +1100 [thread overview]
Message-ID: <20130319192638.GC6369@dastard> (raw)
In-Reply-To: <1363699415-28022-1-git-send-email-bfoster@redhat.com>
On Tue, Mar 19, 2013 at 09:23:35AM -0400, Brian Foster wrote:
> The mkfs code currently creates a single free space extent record
> for each of the bno and cnt btrees in each AG. The start block of
> the record is pushed forward on the AG that hosts an internal log.
> If the log happens to consume all available space in the AG, the
> start block becomes equal to sb->sb_agblocks and thus invalid.
> This causes xfs_repair to complain.
>
> For example, the following sequence:
>
> mkfs.xfs -d file,name=./fs.img,size=50g,agsize=16m
> xfs_repair ./fs.img
>
> ... produces the following xfs_repair output:
>
> Phase 1 - find and verify superblock...
> Phase 2 - using internal log
> - scan filesystem freespace and inode maps...
> invalid start block 4096 in record 0 of bno btree block 1600/1
> invalid start block 4096 in record 0 of cnt btree block 1600/2
> - found root inode chunk
> ...
>
> xfs_repair appears to correct the numrecs value such that subsequent
> checks are successful. The sequence above is pulled from xfstests
> test #250, which fails due to this behavior.
>
> Modify mkfs.xfs such that we check the block count value of the
> free space record for the log AG after the log is accounted for. If
> no space is left for the record, reset the record count to 0.
>
> Signed-off-by: Brian Foster <bfoster@redhat.com>
> ---
>
> v2:
> - Drop the byte swap.
> - Add a comment.
> - Fix up the commit log description.
Looks good.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-03-19 19:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-19 13:23 [PATCH v2] xfsprogs: reduce bb_numrecs in bno/cnt btrees when log consumes all agf space Brian Foster
2013-03-19 19:26 ` Dave Chinner [this message]
2013-03-22 20:59 ` Rich Johnston
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=20130319192638.GC6369@dastard \
--to=david@fromorbit.com \
--cc=bfoster@redhat.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