Thread (3 messages) 3 messages, 3 authors, 2018-01-23

Re: [PATCH] xfs_copy: accept CRC version of ABTB_MAGIC in ASSERT

From: Bill O'Donnell <hidden>
Date: 2018-01-23 23:35:58

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 <redacted>
Signed-off-by: Eric Sandeen <redacted>
Reviewed-by: Bill O'Donnell <redacted>
quoted hunk ↗ jump to hunk
---

(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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help