diff options
author | Andrew Perepechko <andrew.perepechko@seagate.com> | 2017-04-30 06:46:35 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-04-30 06:46:35 +0200 |
commit | 85c8f176a6111ecde9c158109989dbd445a0e59a (patch) | |
tree | 6bdbf361508bb0159e9e13198424a517ff251d1d /fs/ext4 | |
parent | ext4: make ext4_shutdown() static (diff) | |
download | linux-85c8f176a6111ecde9c158109989dbd445a0e59a.tar.xz linux-85c8f176a6111ecde9c158109989dbd445a0e59a.zip |
ext4: preload block group descriptors
With enabled meta_bg option block group descriptors
reading IO is not sequential and requires optimization.
Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 9ec8963ba604..9a40e0c16dcc 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -3879,6 +3879,12 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) bgl_lock_init(sbi->s_blockgroup_lock); + /* Pre-read the descriptors into the buffer cache */ + for (i = 0; i < db_count; i++) { + block = descriptor_loc(sb, logical_sb_block, i); + sb_breadahead(sb, block); + } + for (i = 0; i < db_count; i++) { block = descriptor_loc(sb, logical_sb_block, i); sbi->s_group_desc[i] = sb_bread_unmovable(sb, block); |