All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: linux-xfs <linux-xfs@vger.kernel.org>
Cc: Radek Burkat <radek@pinkbike.com>
Subject: [PATCH] xfs_copy: accept CRC version of ABTB_MAGIC in ASSERT
Date: Tue, 23 Jan 2018 16:59:52 -0600	[thread overview]
Message-ID: <9c888b88-b664-730c-a1ff-50ee438714dd@redhat.com> (raw)

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>
---

(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);
 		}
 
 		/*


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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23 22:59 Eric Sandeen [this message]
2018-01-23 23:15 ` [PATCH] xfs_copy: accept CRC version of ABTB_MAGIC in ASSERT Darrick J. Wong
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=9c888b88-b664-730c-a1ff-50ee438714dd@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=radek@pinkbike.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.