public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Brian Foster <bfoster@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, Carlos Maiolino <cem@kernel.org>,
	"Darrick J. Wong" <djwong@kernel.org>,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH 6/6] xfs: update the pag for the last AG at recovery time
Date: Tue, 15 Oct 2024 15:37:00 +0200	[thread overview]
Message-ID: <20241015133700.GB4535@lst.de> (raw)
In-Reply-To: <Zw5qDZXQd2UzoGQu@bfoster>

On Tue, Oct 15, 2024 at 09:11:41AM -0400, Brian Foster wrote:
> > index 25cec9dc10c941..5ca8d01068273d 100644
> > --- a/fs/xfs/libxfs/xfs_ag.c
> > +++ b/fs/xfs/libxfs/xfs_ag.c
> > @@ -273,6 +273,23 @@ xfs_agino_range(
> >  	return __xfs_agino_range(mp, xfs_ag_block_count(mp, agno), first, last);
> >  }
> >  
> 
> Comment please. I.e.,
> 
> /*
>  * Update the perag of the previous tail AG if it has been changed
>  * during recovery (i.e. recovery of a growfs).
>  */

Sure.

> > +	/*
> > +	 * Growfs can also grow the last existing AG.  In this case we also need
> 
> It can shrink the last AG as well, FWIW.

Indeed, I keep forgetting about the weird special case partial shrink
that we support.

> > -	error = xfs_initialize_perag(mp, orig_agcount,
> > -			mp->m_sb.sb_agcount, mp->m_sb.sb_dblocks,
> > -			&mp->m_maxagi);
> > +	error = xfs_initialize_perag(mp, orig_agcount, mp->m_sb.sb_agcount,
> > +			mp->m_sb.sb_dblocks, &mp->m_maxagi);
> 
> Seems like this should be folded into an earlier patch?

Yes.


  reply	other threads:[~2024-10-15 13:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14  6:04 fix recovery of allocator ops after a growfs Christoph Hellwig
2024-10-14  6:04 ` [PATCH 1/6] xfs: pass the exact range to initialize to xfs_initialize_perag Christoph Hellwig
2024-10-15 13:11   ` Brian Foster
2024-10-15 13:35     ` Christoph Hellwig
2024-10-16  6:25     ` Christoph Hellwig
2024-10-14  6:04 ` [PATCH 2/6] xfs: merge the perag freeing helpers Christoph Hellwig
2024-10-14  6:04 ` [PATCH 3/6] xfs: update the file system geometry after recoverying superblock buffers Christoph Hellwig
2024-10-15 13:11   ` Brian Foster
2024-10-15 16:19   ` Darrick J. Wong
2024-10-14  6:04 ` [PATCH 4/6] xfs: error out when a superblock buffer update reduces the agcount Christoph Hellwig
2024-10-14  6:04 ` [PATCH 5/6] xfs: don't use __GFP_RETRY_MAYFAIL in xfs_initialize_perag Christoph Hellwig
2024-10-14  6:04 ` [PATCH 6/6] xfs: update the pag for the last AG at recovery time Christoph Hellwig
2024-10-15 13:11   ` Brian Foster
2024-10-15 13:37     ` Christoph Hellwig [this message]
2024-10-26  7:27 ` fix recovery of allocator ops after a growfs Carlos Maiolino

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=20241015133700.GB4535@lst.de \
    --to=hch@lst.de \
    --cc=bfoster@redhat.com \
    --cc=cem@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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