public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Carlos Maiolino <cmaiolino@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] db: fix AGI ops definition in CRC type table
Date: Fri, 16 Oct 2015 10:09:39 +0200	[thread overview]
Message-ID: <20151016080939.GA3970@redhat.com> (raw)
In-Reply-To: <1444709821-5009-1-git-send-email-david@fromorbit.com>

On Tue, Oct 13, 2015 at 03:17:01PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> The wrong buffer ops structure was added to the AGI field of the
> type table when initially committed. This was not noticed because it
> only affects manually setting the type of a buffer from xfs_db. e.g

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

> 
> xfs_db> agi 0
> xfs_db> p
> .....
> crc = 0xbc58d757 (correct)
> .....
> xfs_db> fsb 2
> xfs_db> type agi
> Metadata CRC error detected at block 0x10/0x1000
> xfs_db>
> 
> This is because (trimmed for clarity):
> 
> Breakpoint 1, xfs_verifier_error:
> (gdb) bt
> #0  xfs_verifier_error
> #1  xfs_agfl_read_verify
> #2  set_iocur_type
> #3  type_f
> #4  main
> 
> It's clear that the wrong verifier is being run (AGFL, not AGI).
> The fix is simple.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
>  db/type.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/db/type.c b/db/type.c
> index 955986b..1da7ee1 100644
> --- a/db/type.c
> +++ b/db/type.c
> @@ -77,7 +77,7 @@ static const typ_t	__typtab[] = {
>  static const typ_t	__typtab_crc[] = {
>  	{ TYP_AGF, "agf", handle_struct, agf_hfld, &xfs_agf_buf_ops },
>  	{ TYP_AGFL, "agfl", handle_struct, agfl_crc_hfld, &xfs_agfl_buf_ops },
> -	{ TYP_AGI, "agi", handle_struct, agi_hfld, &xfs_agfl_buf_ops },
> +	{ TYP_AGI, "agi", handle_struct, agi_hfld, &xfs_agi_buf_ops },
>  	{ TYP_ATTR, "attr3", handle_struct, attr3_hfld,
>  		&xfs_attr3_db_buf_ops },
>  	{ TYP_BMAPBTA, "bmapbta", handle_struct, bmapbta_crc_hfld,
> @@ -113,7 +113,7 @@ static const typ_t	__typtab_crc[] = {
>  static const typ_t	__typtab_spcrc[] = {
>  	{ TYP_AGF, "agf", handle_struct, agf_hfld, &xfs_agf_buf_ops },
>  	{ TYP_AGFL, "agfl", handle_struct, agfl_crc_hfld, &xfs_agfl_buf_ops },
> -	{ TYP_AGI, "agi", handle_struct, agi_hfld, &xfs_agfl_buf_ops },
> +	{ TYP_AGI, "agi", handle_struct, agi_hfld, &xfs_agi_buf_ops },
>  	{ TYP_ATTR, "attr3", handle_struct, attr3_hfld,
>  		&xfs_attr3_db_buf_ops },
>  	{ TYP_BMAPBTA, "bmapbta", handle_struct, bmapbta_crc_hfld,
> -- 
> 2.5.0
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

-- 
Carlos

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      parent reply	other threads:[~2015-10-16  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13  4:17 [PATCH] db: fix AGI ops definition in CRC type table Dave Chinner
2015-10-13  7:23 ` Darrick J. Wong
2015-10-16  8:09 ` Carlos Maiolino [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=20151016080939.GA3970@redhat.com \
    --to=cmaiolino@redhat.com \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /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