From 53c2c8afeade037cf16b0631271a850b04c14c78 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 2 Aug 2012 20:47:45 -0400 Subject: [PATCH] mke2fs: record the checksum algorithm in use in the superblock Record the type of checksum algorithm we're using for metadata in the superblock when creating a filesystem. Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o --- misc/mke2fs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/mke2fs.c b/misc/mke2fs.c index d1d8156..06216b1 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -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); -- 1.8.3.1