public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs_copy: accept CRC version of ABTB_MAGIC in ASSERT
@ 2018-01-23 22:59 Eric Sandeen
  2018-01-23 23:15 ` Darrick J. Wong
  2018-01-23 23:35 ` Bill O'Donnell
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Sandeen @ 2018-01-23 22:59 UTC (permalink / raw)
  To: linux-xfs; +Cc: Radek Burkat

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-23 23:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2018-01-23 23:35 ` Bill O'Donnell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox