From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: sandeen@sandeen.net, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/5] xfs_scrub: separate internal metadata scrub functions
Date: Mon, 16 Sep 2019 14:26:18 -0700 [thread overview]
Message-ID: <20190916212618.GN2229799@magnolia> (raw)
In-Reply-To: <20190910001933.GI16973@dread.disaster.area>
On Tue, Sep 10, 2019 at 10:19:33AM +1000, Dave Chinner wrote:
> On Thu, Sep 05, 2019 at 08:33:47PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Refactor xfs_scrub_metadata into two functions -- one to make a single
> > call xfs_check_metadata, and the second retains the loop logic. The
> > name is a little easy to confuse with other functions, so rename it to
> > reflect what it actually does: scrub all internal metadata of a given
> > class (AG header, AG metadata, FS metadata). No functional changes.
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>
> Minor nit:
>
> > +/* Scrub non-inode metadata, saving corruption reports for later. */
> > +static int
> > +xfs_scrub_meta(
> > + struct scrub_ctx *ctx,
> > + unsigned int type,
> > + xfs_agnumber_t agno,
> > + struct xfs_action_list *alist)
> > +{
> > + struct xfs_scrub_metadata meta = {
> > + .sm_type = type,
> > + .sm_agno = agno,
> > + };
>
> This should be called xfs_scrub_meta_type() because it only
> scrubs the specific type passed into it....
Ok.
> > /* Scrub metadata, saving corruption reports for later. */
> > static bool
> > -xfs_scrub_metadata(
> > +xfs_scrub_meta_type(
> > struct scrub_ctx *ctx,
> > enum xfrog_scrub_type scrub_type,
> > xfs_agnumber_t agno,
> > struct xfs_action_list *alist)
> > {
> > - struct xfs_scrub_metadata meta = {0};
> > const struct xfrog_scrub_descr *sc;
> > - enum check_outcome fix;
> > - int type;
> > + unsigned int type;
> >
> > sc = xfrog_scrubbers;
> > for (type = 0; type < XFS_SCRUB_TYPE_NR; type++, sc++) {
> > + int ret;
> > +
>
> And this should be called xfs_scrub_all_metadata() because it
> walks across all the metadata types in the filesystem and calls
> xfs_scrub_meta_type() for each type to scrub them one by one....
Ok. I think I'll update the comments for both to make it clearer what
"type" means.
--D
> Other than that, it looks fine.
>
> Reviewed-by: Dave Chinner <dchinner@redhat.com>
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
next prev parent reply other threads:[~2019-09-16 21:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-06 3:33 [PATCH 0/5] xfsprogs: scrub filesystem summary counters Darrick J. Wong
2019-09-06 3:33 ` [PATCH 1/5] xfs_scrub: remove unnecessary fd parameter from file scrubbers Darrick J. Wong
2019-09-09 23:29 ` Dave Chinner
2019-09-06 3:33 ` [PATCH 2/5] libfrog: share scrub headers Darrick J. Wong
2019-09-09 23:36 ` Dave Chinner
2019-09-06 3:33 ` [PATCH 3/5] libfrog: add online scrub/repair for superblock counters Darrick J. Wong
2019-09-09 23:55 ` Dave Chinner
2019-09-06 3:33 ` [PATCH 4/5] xfs_scrub: separate internal metadata scrub functions Darrick J. Wong
2019-09-10 0:19 ` Dave Chinner
2019-09-16 21:26 ` Darrick J. Wong [this message]
2019-09-06 3:33 ` [PATCH 5/5] xfs_scrub: check summary counters Darrick J. Wong
2019-09-10 0:21 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2019-09-25 21:31 [PATCH 0/5] xfsprogs: scrub filesystem " Darrick J. Wong
2019-09-25 21:31 ` [PATCH 4/5] xfs_scrub: separate internal metadata scrub functions Darrick J. Wong
2019-09-26 17:37 ` Eric Sandeen
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=20190916212618.GN2229799@magnolia \
--to=darrick.wong@oracle.com \
--cc=david@fromorbit.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).