From: Eric Sandeen <sandeen@redhat.com>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] xfs_copy: accept XFS_ABTB_CRC_MAGIC
Date: Tue, 25 Feb 2014 20:03:20 -0600 [thread overview]
Message-ID: <530D4B68.9090905@redhat.com> (raw)
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
next reply other threads:[~2014-02-26 2:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 2:03 Eric Sandeen [this message]
2014-02-26 2:07 ` [PATCH] xfs_copy: accept XFS_ABTB_CRC_MAGIC 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
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=530D4B68.9090905@redhat.com \
--to=sandeen@redhat.com \
--cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox