All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs_copy: accept XFS_ABTB_CRC_MAGIC
@ 2014-02-26  2:03 Eric Sandeen
  2014-02-26  2:07 ` Christoph Hellwig
  2014-02-26 16:22 ` [PATCH V2] xfs_copy: band-aids for CRC filesystems Eric Sandeen
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Sandeen @ 2014-02-26  2:03 UTC (permalink / raw)
  To: xfs-oss

xfs_copy needs a fair bit of work for CRCs because it rewrites
UUIDs by default, but this change will get it working properly
with the "-d" (duplicate) option which keeps the same UUID.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

However, I wonder if we should fail CRC filesystems outright
for now if -d isn't specified, because it will invalidate every
CRC and generally make a mess of things...

diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
index 9986fbf..7c807a4 100644
--- a/copy/xfs_copy.c
+++ b/copy/xfs_copy.c
@@ -957,7 +957,9 @@ 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_sb_version_hascrc(&mp->m_sb) ?
+				 XFS_ABTB_CRC_MAGIC : XFS_ABTB_MAGIC));
 
 			if (be16_to_cpu(block->bb_level) == 0)
 				break;

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2014-02-26 20:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-26  2:03 [PATCH] xfs_copy: accept XFS_ABTB_CRC_MAGIC Eric Sandeen
2014-02-26  2:07 ` Christoph Hellwig
2014-02-26  6:02   ` Dave Chinner
2014-02-26 16:22 ` [PATCH V2] xfs_copy: band-aids for CRC filesystems Eric Sandeen
2014-02-26 20:48   ` Christoph Hellwig

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.