| To: | xfs-oss <xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] xfs_copy: accept XFS_ABTB_CRC_MAGIC |
| From: | Eric Sandeen <sandeen@xxxxxxxxxx> |
| Date: | Tue, 25 Feb 2014 20:03:20 -0600 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
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@xxxxxxxxxx>
---
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;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH v5 1/10] fs: Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate, Dave Chinner |
|---|---|
| Next by Date: | Re: [PATCH] xfs_copy: accept XFS_ABTB_CRC_MAGIC, Christoph Hellwig |
| Previous by Thread: | SEMINARIO "DIRECCIÓN Y ADMINISTRACIÓN DE VENTAS" APROVECHA DESCUENTO, Capacitacion Integral |
| Next by Thread: | Re: [PATCH] xfs_copy: accept XFS_ABTB_CRC_MAGIC, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |