Skip to content

Commit dedf8f9

Browse files
committed
make_ext4fs: Modify ext4 filesystem setup to speed up fsck
1) Set EXT4_BG_INODE_UNINIT so fsck will skip scanning unused inodes 2) Use EXT4_FEATURE_RO_COMPAT_GDT_CSUM to enable group descriptor checksums in filesystem which reduces overhead for fsck BUG: 24747200 BUG: 28013112 Change-Id: I118ab26935442f452962b3a7c29c61acf76ad4d9 Signed-off-by: Mohamad Ayyash <[email protected]>
1 parent 2362310 commit dedf8f9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ext4_utils/allocate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ static void init_bg(struct block_group_info *bg, unsigned int i)
277277
bg->free_blocks = info.blocks_per_group;
278278
bg->free_inodes = info.inodes_per_group;
279279
bg->first_free_inode = 1;
280-
bg->flags = 0;
280+
bg->flags = EXT4_BG_INODE_UNINIT;
281281

282282
bg->chunk_count = 0;
283283
bg->max_chunk_count = 1;

ext4_utils/make_ext4fs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,8 @@ int make_ext4fs_internal(int fd, const char *_directory, const char *_target_out
749749

750750
info.feat_ro_compat |=
751751
EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER |
752-
EXT4_FEATURE_RO_COMPAT_LARGE_FILE;
752+
EXT4_FEATURE_RO_COMPAT_LARGE_FILE |
753+
EXT4_FEATURE_RO_COMPAT_GDT_CSUM;
753754

754755
info.feat_incompat |=
755756
EXT4_FEATURE_INCOMPAT_EXTENTS |

0 commit comments

Comments
 (0)