From: "Darrick J. Wong" Subject: [PATCH 35/51] mke2fs: Record the checksum algorithm in use in the superblock Date: Tue, 13 Dec 2011 17:17:10 -0800 Message-ID: <20111214011710.20947.20598.stgit@elm3c44.beaverton.ibm.com> References: <20111214011316.20947.13706.stgit@elm3c44.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Sunil Mushran , Amir Goldstein , Andi Kleen , Mingming Cao , Joel Becker , linux-ext4@vger.kernel.org, Coly Li To: Andreas Dilger , Theodore Tso , "Darrick J. Wong" Return-path: Received: from e3.ny.us.ibm.com ([32.97.182.143]:48722 "EHLO e3.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932084Ab1LNBRp (ORCPT ); Tue, 13 Dec 2011 20:17:45 -0500 Received: from /spool/local by e3.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Dec 2011 20:17:45 -0500 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBE1HDeY255454 for ; Tue, 13 Dec 2011 20:17:22 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBE1HCv0015469 for ; Tue, 13 Dec 2011 23:17:13 -0200 In-Reply-To: <20111214011316.20947.13706.stgit@elm3c44.beaverton.ibm.com> Sender: linux-ext4-owner@vger.kernel.org List-ID: Record the type of checksum algorithm we're using for metadata in the superblock when creating a filesystem. Signed-off-by: Darrick J. Wong --- misc/mke2fs.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 98af8b0..ba7625d 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -2418,6 +2418,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);