]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_copy: accept CRC version of ABTB_MAGIC in ASSERT
authorEric Sandeen <sandeen@redhat.com>
Thu, 25 Jan 2018 19:55:01 +0000 (13:55 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 25 Jan 2018 19:55:01 +0000 (13:55 -0600)
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>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
copy/xfs_copy.c

index fb37375db051a45cc3a00c9076a5c5382c21bf8a..16ee4d9c5180f932249850dccab118f2c00c4535 100644 (file)
@@ -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);
                }
 
                /*