From: "Darrick J. Wong" Subject: [PATCH 10/51] tune2fs: Rewrite inode bitmap checksums Date: Tue, 13 Dec 2011 17:14:22 -0800 Message-ID: <20111214011422.20947.47115.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 e9.ny.us.ibm.com ([32.97.182.139]:37290 "EHLO e9.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756432Ab1LNBOn (ORCPT ); Tue, 13 Dec 2011 20:14:43 -0500 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Dec 2011 20:14:43 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBE1EQF0220002 for ; Tue, 13 Dec 2011 20:14:28 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBE1EOWt006110 for ; Tue, 13 Dec 2011 23:14:26 -0200 In-Reply-To: <20111214011316.20947.13706.stgit@elm3c44.beaverton.ibm.com> Sender: linux-ext4-owner@vger.kernel.org List-ID: When toggling metadata_csum, mark the inode bitmap dirty so that they are written out with new checksums. Signed-off-by: Darrick J. Wong --- misc/tune2fs.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 260b040..b53e5da 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -426,6 +426,9 @@ static void rewrite_metadata_checksums(ext2_filsys fs) { fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS; rewrite_inodes(fs); + ext2fs_read_bitmaps(fs); + ext2fs_mark_ib_dirty(fs); + fs->flags &= ~EXT2_FLAG_SUPER_ONLY; fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS; }