Whamcloud - gitweb
tune2fs: rewrite inode bitmap checksums
authorDarrick J. Wong <djwong@us.ibm.com>
Mon, 30 Jul 2012 22:58:04 +0000 (18:58 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 30 Jul 2012 22:58:04 +0000 (18:58 -0400)
When toggling metadata_csum, mark the inode bitmap dirty so that they
are written out with new checksums.

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

index 46520c2..2bd707b 100644 (file)
@@ -427,6 +427,9 @@ static void rewrite_metadata_checksums(ext2_filsys fs)
        fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
        ext2fs_init_csum_seed(fs);
        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;
 }