diff options
author | Mohamad Ayyash <mkayyash@google.com> | 2016-04-14 19:43:31 -0700 |
---|---|---|
committer | Mohamad Ayyash <mkayyash@google.com> | 2016-04-15 18:43:57 -0700 |
commit | dedf8f9705df13e1fd07d3f754216d34725bb269 (patch) | |
tree | c65219214600d04bce591b32c92d84d55ff08ac0 | |
parent | 2362310b546b157eeee352e72b1585363002d662 (diff) | |
download | extras-dedf8f9705df13e1fd07d3f754216d34725bb269.tar.gz |
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 <mkayyash@google.com>
-rw-r--r-- | ext4_utils/allocate.c | 2 | ||||
-rw-r--r-- | ext4_utils/make_ext4fs.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ext4_utils/allocate.c b/ext4_utils/allocate.c index 0c99e913..f5fd4fa0 100644 --- a/ext4_utils/allocate.c +++ b/ext4_utils/allocate.c @@ -277,7 +277,7 @@ static void init_bg(struct block_group_info *bg, unsigned int i) bg->free_blocks = info.blocks_per_group; bg->free_inodes = info.inodes_per_group; bg->first_free_inode = 1; - bg->flags = 0; + bg->flags = EXT4_BG_INODE_UNINIT; bg->chunk_count = 0; bg->max_chunk_count = 1; diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c index 1a6c0c1c..6083ceaa 100644 --- a/ext4_utils/make_ext4fs.c +++ b/ext4_utils/make_ext4fs.c @@ -749,7 +749,8 @@ int make_ext4fs_internal(int fd, const char *_directory, const char *_target_out info.feat_ro_compat |= EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER | - EXT4_FEATURE_RO_COMPAT_LARGE_FILE; + EXT4_FEATURE_RO_COMPAT_LARGE_FILE | + EXT4_FEATURE_RO_COMPAT_GDT_CSUM; info.feat_incompat |= EXT4_FEATURE_INCOMPAT_EXTENTS | |