]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_metadump: requires some object CRC recalculation
authorDave Chinner <dchinner@redhat.com>
Fri, 7 Jun 2013 00:26:05 +0000 (10:26 +1000)
committerBen Myers <bpm@sgi.com>
Tue, 6 Aug 2013 21:01:10 +0000 (16:01 -0500)
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@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
db/metadump.c
mdrestore/xfs_mdrestore.c

index bc1c7faab6e69c5007a4809f29c4aca74a3396d8..1c8020b471d2606b14bea6f1640acd7951e7c147 100644 (file)
@@ -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");
index e57bdb2100534aafda2cdd0c13ca5af7095f7a15..fe61766e640e479aa65da97068612f7f36351162 100644 (file)
@@ -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)  {