ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT);
ext2fs_bg_flags_clear(fs, group, EXT2_BG_INODE_UNINIT);
ext2fs_bg_itable_unused_set(fs, group, 0);
+ /* The checksum will be reset later, but fix it here
+ * anyway to avoid printing a lot of spurious errors. */
+ ext2fs_group_desc_csum_set(fs, group);
}
ext2fs_mark_super_dirty(fs);
}
../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
-One or more block group descriptor checksums are invalid. Fix? yes
-
-Group descriptor 0 checksum is invalid. FIXED.
Inode table for group 1 is not in group. (block 0)
WARNING: SEVERE DATA LOSS POSSIBLE.
Relocate? yes
-Group descriptor 1 checksum is invalid. FIXED.
-Group descriptor 2 checksum is invalid. FIXED.
-Group descriptor 3 checksum is invalid. FIXED.
Pass 1: Checking inodes, blocks, and sizes
Relocating group 1's inode table to 142...
Restarting e2fsck from the beginning...
+One or more block group descriptor checksums are invalid. Fix? yes
+
Group descriptor 1 checksum is invalid. FIXED.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure