public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: always rescan allegedly healthy per-ag metadata after repair
Date: Wed, 23 Oct 2019 07:09:08 -0400	[thread overview]
Message-ID: <20191023110908.GB59518@bfoster> (raw)
In-Reply-To: <157063978533.2913625.15756257326965494318.stgit@magnolia>

On Wed, Oct 09, 2019 at 09:49:45AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> After an online repair function runs for a per-AG metadata structure,
> sc->sick_mask is supposed to reflect the per-AG metadata that the repair
> function fixed.  Our next move is to re-check the metadata to assess
> the completeness of our repair, so we don't want the rebuilt structure
> to be excluded from the rescan just because the health system previously
> logged a problem with the data structure.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/scrub/health.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> 
> diff --git a/fs/xfs/scrub/health.c b/fs/xfs/scrub/health.c
> index b2f602811e9d..4865b2180e22 100644
> --- a/fs/xfs/scrub/health.c
> +++ b/fs/xfs/scrub/health.c
> @@ -220,6 +220,16 @@ xchk_ag_btree_healthy_enough(
>  		return true;
>  	}
>  
> +	/*
> +	 * If we just repaired some AG metadata, sc->sick_mask will reflect all
> +	 * the per-AG metadata types that were repaired.  Exclude these from
> +	 * the filesystem health query because we have not yet updated the
> +	 * health status and we want everything to be scanned.
> +	 */
> +	if ((sc->flags & XREP_ALREADY_FIXED) &&
> +	    type_to_health_flag[sc->sm->sm_type].group == XHG_AG)
> +		mask &= ~sc->sick_mask;
> +
>  	if (xfs_ag_has_sickness(pag, mask)) {
>  		sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XFAIL;
>  		return false;
> 


      reply	other threads:[~2019-10-23 11:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 16:49 [PATCH 0/2] xfs: health evaluations for repair Darrick J. Wong
2019-10-09 16:49 ` [PATCH 1/2] xfs: add a repair revalidation function pointer Darrick J. Wong
2019-10-23 11:09   ` Brian Foster
2019-10-09 16:49 ` [PATCH 2/2] xfs: always rescan allegedly healthy per-ag metadata after repair Darrick J. Wong
2019-10-23 11:09   ` Brian Foster [this message]

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=20191023110908.GB59518@bfoster \
    --to=bfoster@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox