From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] xfs: skip scrub xref if corruption already noted
Date: Tue, 3 Apr 2018 11:48:57 +1000 [thread overview]
Message-ID: <20180403014857.GI1150@dastard> (raw)
In-Reply-To: <152269893600.16253.2058199896357918178.stgit@magnolia>
On Mon, Apr 02, 2018 at 12:55:36PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Don't bother looking for cross-referencing problems if the metadata is
> already corrupt or we've already found a cross-referencing problem.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
> fs/xfs/scrub/alloc.c | 4 +++-
> fs/xfs/scrub/common.c | 5 +++++
> fs/xfs/scrub/ialloc.c | 4 +++-
> fs/xfs/scrub/refcount.c | 8 ++++++--
> fs/xfs/scrub/rmap.c | 8 ++++++--
> fs/xfs/scrub/rtbitmap.c | 4 ++++
> 6 files changed, 27 insertions(+), 6 deletions(-)
>
>
> diff --git a/fs/xfs/scrub/alloc.c b/fs/xfs/scrub/alloc.c
> index 517c079..096bc53 100644
> --- a/fs/xfs/scrub/alloc.c
> +++ b/fs/xfs/scrub/alloc.c
> @@ -172,7 +172,9 @@ xfs_scrub_xref_is_used_space(
> bool is_freesp;
> int error;
>
> - if (!sc->sa.bno_cur)
> + if (!sc->sa.bno_cur ||
> + (sc->sm->sm_flags & (XFS_SCRUB_OFLAG_CORRUPT |
> + XFS_SCRUB_OFLAG_XCORRUPT)))
Can you put this check in a static inline?
if (xfs_scrub_object_is_corrupt(sc))
return;
Looks a bunch neater here.
Otherwise it looks fine.
-Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-04-03 1:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-02 19:55 [PATCH 0/2] xfs: online scrub fixes Darrick J. Wong
2018-04-02 19:55 ` [PATCH 1/2] xfs: skip scrub xref if corruption already noted Darrick J. Wong
2018-04-03 1:48 ` Dave Chinner [this message]
2018-04-03 3:00 ` [PATCH v2 " Darrick J. Wong
2018-04-02 19:55 ` [PATCH 2/2] xfs: hoist xfs_scrub_agfl_walk to libxfs as xfs_agfl_walk Darrick J. Wong
2018-04-03 1:53 ` Dave Chinner
2018-04-03 3:01 ` [PATCH v2 " Darrick J. Wong
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=20180403014857.GI1150@dastard \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.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.