xfs
[Top] [All Lists]

Re: [PATCH v2] xfsprogs: reduce bb_numrecs in bno/cnt btrees when log co

To: Brian Foster <bfoster@xxxxxxxxxx>
Subject: Re: [PATCH v2] xfsprogs: reduce bb_numrecs in bno/cnt btrees when log consumes all agf space
From: Rich Johnston <rjohnston@xxxxxxx>
Date: Fri, 22 Mar 2013 15:59:24 -0500
Cc: <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1363699415-28022-1-git-send-email-bfoster@xxxxxxxxxx>
References: <1363699415-28022-1-git-send-email-bfoster@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1
Thanks for submitting this patch Brian, it has been committed.

Thanks
--Rich


commit 64ae7fcf6d1284e6905879697b55c4146fa881cf
Author: Brian Foster <bfoster@xxxxxxxxxx>
Date:   Tue Mar 19 13:23:35 2013 +0000

xfsprogs: reduce bb_numrecs in bno/cnt btrees when log consumes all agf space

    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@xxxxxxxxxx>
    Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Signed-off-by: Rich Johnston <rjohnston@xxxxxxx>

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