+ fs->stride = fs->super->s_raid_stride;
+
+ /*
+ * If recovery is from backup superblock, Clear _UNININT flags &
+ * reset bg_itable_unused to zero
+ */
+ if (superblock > 1 && EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) {
+ dgrp_t group;
+
+ for (group = 0; group < fs->group_desc_count; group++) {
+ 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);
+ }
+ if (fs->flags & EXT2_FLAG_RW)
+ ext2fs_mark_super_dirty(fs);
+ }
+
+ fs->flags &= ~EXT2_FLAG_NOFREE_ON_ERROR;