All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-xfs <linux-xfs@vger.kernel.org>, Radek Burkat <radek@pinkbike.com>
Subject: Re: [PATCH] xfs_copy: accept CRC version of ABTB_MAGIC in ASSERT
Date: Tue, 23 Jan 2018 15:15:22 -0800	[thread overview]
Message-ID: <20180123231522.GS25805@magnolia> (raw)
In-Reply-To: <9c888b88-b664-730c-a1ff-50ee438714dd@redhat.com>

On Tue, Jan 23, 2018 at 04:59:52PM -0600, Eric Sandeen wrote:
> Not sure how this was missed for so long, but to handle CRC
> filesystems, this ASSERT on block magic must accept CRC magic
> as well.
> 
> Reported-by: Radek Burkat <radek@pinkbike.com>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

I was /about/ to squawk about 'just use the allocbt verifier' but then
remembered that we don't use the xfs_buf infrastructure...

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

> ---
> 
> (yes, it's > 80 cols but .. so is most of this indented 
> code block o_O)
> 
> diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
> index fb37375..16ee4d9 100644
> --- a/copy/xfs_copy.c
> +++ b/copy/xfs_copy.c
> @@ -1140,7 +1140,8 @@ main(int argc, char **argv)
>  				 ((char *) btree_buf.data +
>  				  pos - btree_buf.position);
>  
> -			ASSERT(be32_to_cpu(block->bb_magic) == XFS_ABTB_MAGIC);
> +			ASSERT(be32_to_cpu(block->bb_magic) == XFS_ABTB_MAGIC ||
> +			       be32_to_cpu(block->bb_magic) == XFS_ABTB_CRC_MAGIC);
>  		}
>  
>  		/*
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-01-23 23:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23 22:59 [PATCH] xfs_copy: accept CRC version of ABTB_MAGIC in ASSERT Eric Sandeen
2018-01-23 23:15 ` Darrick J. Wong [this message]
2018-01-23 23:35 ` Bill O'Donnell

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=20180123231522.GS25805@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=radek@pinkbike.com \
    --cc=sandeen@redhat.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 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.