From: Dave Chinner Date: Fri, 7 Jun 2013 00:26:05 +0000 (+1000) Subject: xfs_metadump: requires some object CRC recalculation X-Git-Tag: v3.2.0-alpha1~90 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a03f4a6a896a3cddf49b66e3531c6c06c855900;p=thirdparty%2Fxfsprogs-dev.git xfs_metadump: requires some object CRC recalculation 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 Reviewed-by: Ben Myers Signed-off-by: Ben Myers --- diff --git a/db/metadump.c b/db/metadump.c index bc1c7faab..1c8020b47 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 e57bdb210..fe61766e6 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) {