From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 6/7] xfs: separate secondary sb update in growfs
Date: Fri, 16 Feb 2018 09:23:58 +1100 [thread overview]
Message-ID: <20180215222358.GS7000@dastard> (raw)
In-Reply-To: <20180209161153.GC21413@bfoster.bfoster>
On Fri, Feb 09, 2018 at 11:11:54AM -0500, Brian Foster wrote:
> On Thu, Feb 01, 2018 at 05:42:01PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > This happens after all the transactions to update the superblock
> > occur, and errors need to be handled slightly differently. Seperate
>
> Separate
>
> > out the code into it's own function, and clean up the error goto
> > stack in the core growfs code as it is now much simpler.
> >
> > Signed-Off-By: Dave Chinner <dchinner@redhat.com>
> > ---
> > fs/xfs/xfs_fsops.c | 154 ++++++++++++++++++++++++++++++-----------------------
> > 1 file changed, 87 insertions(+), 67 deletions(-)
> >
> > diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
> > index 5c844e540320..113be7dbdc81 100644
> > --- a/fs/xfs/xfs_fsops.c
> > +++ b/fs/xfs/xfs_fsops.c
> ...
> > @@ -572,16 +572,79 @@ xfs_growfs_data_private(
> > error = xfs_ag_resv_free(pag);
> > xfs_perag_put(pag);
> > if (error)
> > - goto out;
> > + return error;
> > }
> >
> > /* Reserve AG metadata blocks. */
> > - error = xfs_fs_reserve_ag_blocks(mp);
> > - if (error && error != -ENOSPC)
> > - goto out;
> > + return xfs_fs_reserve_ag_blocks(mp);
>
> It looks like we change the semantics of -ENOSPC during perag
> reservation init. No mention of whether this is intentional and/or
> why..?
Not sure what I changed here - it just returns the error to the
caller because it's no longer going to jump over code after
xfs_fs_reserve_ag_blocks(mp) has already shut down the filesystem
(which it does on any error other than ENOSPC).
Perhaps....
> > @@ -694,6 +707,7 @@ xfs_growfs_data(
> > struct xfs_mount *mp,
> > struct xfs_growfs_data *in)
> > {
> > + xfs_agnumber_t oagcount;
> > int error = 0;
> >
> > if (!capable(CAP_SYS_ADMIN))
> > @@ -708,6 +722,7 @@ xfs_growfs_data(
> > goto out_error;
> > }
> >
> > + oagcount = mp->m_sb.sb_agcount;
> > error = xfs_growfs_data_private(mp, in);
> > if (error)
> > goto out_error;
.... you are commenting on this code here, were ENOSPC is not
specially handled to all the superblocks to be updated even if we
got an ENOSPC on data-grow?
> > @@ -722,6 +737,11 @@ xfs_growfs_data(
> > } else
> > mp->m_maxicount = 0;
> >
> > + /*
> > + * Update secondary superblocks now the physical grow has completed
> > + */
> > + error = xfs_growfs_update_superblocks(mp, oagcount);
> > +
i.e. it doesn't run this at ENOSPC now?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-02-15 22:24 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 6:41 [PATCH 0/7] xfs: refactor and tablise growfs Dave Chinner
2018-02-01 6:41 ` [PATCH 1/7] xfs: factor out AG header initialisation from growfs core Dave Chinner
2018-02-08 18:53 ` Brian Foster
2018-02-01 6:41 ` [PATCH 2/7] xfs: convert growfs AG header init to use buffer lists Dave Chinner
2018-02-08 18:53 ` Brian Foster
2018-02-01 6:41 ` [PATCH 3/7] xfs: factor ag btree reoot block initialisation Dave Chinner
2018-02-08 18:54 ` Brian Foster
2018-02-08 20:00 ` Darrick J. Wong
2018-02-09 13:10 ` Brian Foster
2018-02-12 0:45 ` Darrick J. Wong
2018-02-15 5:53 ` Darrick J. Wong
2018-02-01 6:41 ` [PATCH 4/7] xfs: turn ag header initialisation into a table driven operation Dave Chinner
2018-02-09 16:11 ` Brian Foster
2018-02-01 6:42 ` [PATCH 5/7] xfs: make imaxpct changes in growfs separate Dave Chinner
2018-02-09 16:11 ` Brian Foster
2018-02-15 22:10 ` Dave Chinner
2018-02-01 6:42 ` [PATCH 6/7] xfs: separate secondary sb update in growfs Dave Chinner
2018-02-09 16:11 ` Brian Foster
2018-02-15 22:23 ` Dave Chinner [this message]
2018-02-16 12:31 ` Brian Foster
2018-02-01 6:42 ` [PATCH 7/7] xfs: rework secondary superblock updates " Dave Chinner
2018-02-09 16:12 ` Brian Foster
2018-02-15 22:31 ` Dave Chinner
2018-02-16 12:56 ` Brian Foster
2018-02-16 16:20 ` Darrick J. Wong
2018-02-19 2:16 ` Dave Chinner
2018-02-19 13:21 ` Brian Foster
2018-02-19 22:14 ` Dave Chinner
2018-02-20 12:44 ` Brian Foster
2018-03-24 0:37 ` Darrick J. Wong
2018-02-06 23:44 ` [PATCH 0/7] xfs: refactor and tablise growfs Darrick J. Wong
2018-02-07 7:10 ` Dave Chinner
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=20180215222358.GS7000@dastard \
--to=david@fromorbit.com \
--cc=bfoster@redhat.com \
--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 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.