linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: sandeen@sandeen.net, linux-xfs@vger.kernel.org,
	Brian Foster <bfoster@redhat.com>
Subject: Re: [PATCH v2 3/3] xfs_repair: try to fill the AGFL before we fix the freelist
Date: Thu, 9 Jul 2020 14:37:42 +0100	[thread overview]
Message-ID: <20200709133742.GA3860@infradead.org> (raw)
In-Reply-To: <20200708153455.GM7606@magnolia>

On Wed, Jul 08, 2020 at 08:34:55AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> In commit 9851fd79bfb1, we added a slight amount of slack to the free
> space btrees being reconstructed so that the initial fix_freelist call
> (which is run against a totally empty AGFL) would never have to split
> either free space btree in order to populate the free list.
> 
> The new btree bulk loading code in xfs_repair can re-create this
> situation because it can set the slack values to zero if the filesystem
> is very full.  However, these days repair has the infrastructure needed
> to ensure that overestimations of the btree block counts end up on the
> AGFL or get freed back into the filesystem at the end of phase 5.
> 
> Fix this problem by reserving extra blocks in the bnobt reservation, and
> checking that there are enough overages in the bnobt/cntbt fakeroots to
> populate the AGFL with the minimum number of blocks it needs to handle a
> split in the bno/cnt/rmap btrees.
> 
> Note that we reserve blocks for the new bnobt/cntbt/AGFL at the very end
> of the reservation steps in phase 5, so the extra allocation should not
> cause repair to fail if it can't find blocks for btrees.
> 
> Fixes: 9851fd79bfb1 ("repair: AGFL rebuild fails if btree split required")
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> Reviewed-by: Brian Foster <bfoster@redhat.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

      reply	other threads:[~2020-07-09 13:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 15:26 [PATCH v2 0/3] xfs_repair: more fixes Darrick J. Wong
2020-07-02 15:26 ` [PATCH 1/3] xfs_repair: complain about ag header crc errors Darrick J. Wong
2020-07-06 22:53   ` Allison Collins
2020-07-08  6:36   ` Christoph Hellwig
2020-07-02 15:27 ` [PATCH 2/3] xfs_repair: simplify free space btree calculations in init_freespace_cursors Darrick J. Wong
2020-07-06 22:53   ` Allison Collins
2020-07-07 12:58   ` Brian Foster
2020-07-08  6:40   ` Christoph Hellwig
2020-07-02 15:27 ` [PATCH 3/3] xfs_repair: try to fill the AGFL before we fix the freelist Darrick J. Wong
2020-07-07 12:59   ` Brian Foster
2020-07-07 14:07     ` Darrick J. Wong
2020-07-07 14:13       ` Brian Foster
2020-07-08 15:34   ` [PATCH v2 " Darrick J. Wong
2020-07-09 13:37     ` Christoph Hellwig [this message]

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=20200709133742.GA3860@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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;
as well as URLs for NNTP newsgroup(s).