xfs
[Top] [All Lists]

[PATCH 42/48] xfs_metadump: requires some object CRC recalculation

To: xfs@xxxxxxxxxxx
Subject: [PATCH 42/48] xfs_metadump: requires some object CRC recalculation
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 7 Jun 2013 10:26:05 +1000
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1370564771-4929-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1370564771-4929-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

And we can't do that right now through xfs_db, so disable metadump
and restore for CRC enabled filesystems until the issues have been
sorted out.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 db/metadump.c             |    5 +++++
 mdrestore/xfs_mdrestore.c |    3 +++
 2 files changed, 8 insertions(+)

diff --git a/db/metadump.c b/db/metadump.c
index bc1c7fa..1c8020b 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -2050,6 +2050,11 @@ metadump_f(
                return 0;
        }
 
+       if (xfs_sb_version_hascrc(&mp->m_sb) && dont_obfuscate == 0) {
+               print_warning("Can't obfuscate CRC enabled filesystems yet.");
+               return 0;
+       }
+
        metablock = (xfs_metablock_t *)calloc(BBSIZE + 1, BBSIZE);
        if (metablock == NULL) {
                print_warning("memory allocation failure");
diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
index e57bdb2..fe61766 100644
--- a/mdrestore/xfs_mdrestore.c
+++ b/mdrestore/xfs_mdrestore.c
@@ -109,6 +109,9 @@ perform_restore(
        if (sb.sb_magicnum != XFS_SB_MAGIC)
                fatal("bad magic number for primary superblock\n");
 
+       if (xfs_sb_version_hascrc(&sb))
+               fatal("Can't restore CRC enabled filesystems yet.\n");
+
        ((xfs_dsb_t*)block_buffer)->sb_inprogress = 1;
 
        if (is_target_file)  {
-- 
1.7.10.4

<Prev in Thread] Current Thread [Next in Thread>