All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Gao Xiang <hsiangkao@redhat.com>
Cc: linux-xfs@vger.kernel.org, "Darrick J. Wong" <djwong@kernel.org>,
	Dave Chinner <david@fromorbit.com>,
	Christoph Hellwig <hch@lst.de>,
	Eric Sandeen <sandeen@sandeen.net>,
	"Darrick J . Wong" <darrick.wong@oracle.com>
Subject: Re: [PATCH v8 2/5] xfs: hoist out xfs_resizefs_init_new_ags()
Date: Mon, 22 Mar 2021 08:21:02 -0400	[thread overview]
Message-ID: <YFiLrrNwjxMNHtGl@bfoster> (raw)
In-Reply-To: <20210322115349.GA2000812@xiangao.remote.csb>

On Mon, Mar 22, 2021 at 07:53:49PM +0800, Gao Xiang wrote:
> On Mon, Mar 22, 2021 at 07:28:07AM -0400, Brian Foster wrote:
> > On Fri, Mar 05, 2021 at 10:57:00AM +0800, Gao Xiang wrote:
> > > Move out related logic for initializing new added AGs to a new helper
> > > in preparation for shrinking. No logic changes.
> > > 
> > > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> > > Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
> > > ---
> > >  fs/xfs/xfs_fsops.c | 107 +++++++++++++++++++++++++++------------------
> > >  1 file changed, 64 insertions(+), 43 deletions(-)
> > > 
> > > diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
> > > index 9f9ba8bd0213..fc9e799b2ae3 100644
> > > --- a/fs/xfs/xfs_fsops.c
> > > +++ b/fs/xfs/xfs_fsops.c
...
> > > @@ -123,9 +145,8 @@ xfs_growfs_data_private(
> > >  	 */
> > >  	if (nagcount > oagcount)
> > >  		xfs_trans_mod_sb(tp, XFS_TRANS_SB_AGCOUNT, nagcount - oagcount);
> > > -	if (nb > mp->m_sb.sb_dblocks)
> > > -		xfs_trans_mod_sb(tp, XFS_TRANS_SB_DBLOCKS,
> > > -				 nb - mp->m_sb.sb_dblocks);
> > > +	if (delta > 0)
> > > +		xfs_trans_mod_sb(tp, XFS_TRANS_SB_DBLOCKS, delta);
> > 
> > Hm.. isn't delta still unsigned as of this patch?
> 
> Not sure if some difference exists, I could update it as "if (delta)",
> therefore it seems [PATCH v8 4/5] won't modify this anymore.
> 

Yeah, not sure it's a problem, it just stands out a bit with it being in
a separate patch from the change to the variable type.

Brian

> Thanks,
> Gao Xiang
> 
> > 
> > Brian
> > 
> > >  	if (id.nfree)
> > >  		xfs_trans_mod_sb(tp, XFS_TRANS_SB_FDBLOCKS, id.nfree);
> > >  
> > > @@ -152,7 +173,7 @@ xfs_growfs_data_private(
> > >  	 * If we expanded the last AG, free the per-AG reservation
> > >  	 * so we can reinitialize it with the new size.
> > >  	 */
> > > -	if (delta) {
> > > +	if (lastag_resetagres) {
> > >  		struct xfs_perag	*pag;
> > >  
> > >  		pag = xfs_perag_get(mp, id.agno);
> > > -- 
> > > 2.27.0
> > > 
> > 
> 


  reply	other threads:[~2021-03-22 12:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05  2:56 [PATCH v8 0/5] xfs: support shrinking free space in the last AG Gao Xiang
2021-03-05  2:56 ` [PATCH v8 1/5] xfs: update lazy sb counters immediately for resizefs Gao Xiang
2021-03-22 11:27   ` Brian Foster
2021-03-05  2:57 ` [PATCH v8 2/5] xfs: hoist out xfs_resizefs_init_new_ags() Gao Xiang
2021-03-22 11:28   ` Brian Foster
2021-03-22 11:53     ` Gao Xiang
2021-03-22 12:21       ` Brian Foster [this message]
2021-03-05  2:57 ` [PATCH v8 3/5] xfs: introduce xfs_ag_shrink_space() Gao Xiang
2021-03-09 18:05   ` Darrick J. Wong
2021-03-22 11:30   ` Brian Foster
2021-03-22 12:03     ` Gao Xiang
2021-03-22 12:25       ` Brian Foster
2021-03-22 12:33         ` Gao Xiang
2021-03-22 16:38           ` Darrick J. Wong
2021-03-05  2:57 ` [PATCH v8 4/5] xfs: support shrinking unused space in the last AG Gao Xiang
2021-03-22 11:30   ` Brian Foster
2021-03-22 12:07     ` Gao Xiang
2021-03-22 12:26       ` Brian Foster
2021-03-22 12:36         ` Gao Xiang
2021-03-22 12:43           ` Brian Foster
2021-03-22 12:50             ` Gao Xiang
2021-03-22 16:42               ` Darrick J. Wong
2021-03-23  1:15                 ` Gao Xiang
2021-03-05  2:57 ` [PATCH v8 5/5] xfs: add error injection for per-AG resv failure Gao Xiang
2021-03-09 18:05   ` Darrick J. Wong
2021-03-09 18:44     ` Gao Xiang

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=YFiLrrNwjxMNHtGl@bfoster \
    --to=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=hsiangkao@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.