]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
mke2fs: record the checksum algorithm in use in the superblock
authorDarrick J. Wong <djwong@us.ibm.com>
Fri, 3 Aug 2012 00:47:45 +0000 (20:47 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 3 Aug 2012 00:47:45 +0000 (20:47 -0400)
Record the type of checksum algorithm we're using for metadata in the
superblock when creating a filesystem.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mke2fs.c

index d1d8156d93f2433c7ecc47298820612867034889..06216b1f08b82c6b30e02d7e9fe1714f50885841 100644 (file)
@@ -2427,6 +2427,10 @@ int main (int argc, char *argv[])
                        sizeof(fs->super->s_last_mounted));
        }
 
+       if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+                                      EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))
+               fs->super->s_checksum_type = EXT2_CRC32C_CHKSUM;
+
        if (!quiet || noaction)
                show_stats(fs);