Whamcloud - gitweb
LU-12353 ldiskfs: speedup quota journalling
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel7.6 / ext4-preread-gd.patch
1 commit 85c8f176a6111ecde9c158109989dbd445a0e59a
2 Author: Andrew Perepechko <andrew.perepechko@seagate.com>
3 AuthorDate: Sun Apr 30 00:46:35 2017 -0400
4 Commit: Theodore Ts'o <tytso@mit.edu>
5 CommitDate: Sun Apr 30 00:46:35 2017 -0400
6 ext4: preload block group descriptors
7
8 With enabled meta_bg option block group descriptors
9 reading IO is not sequential and requires optimization.
10
11 Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
12 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 Index: fs/ext4/super.c
14 ===================================================================
15 --- linux-stage/fs/ext4/super.c.orig
16 +++ linux-stage.orig/fs/ext4/super.c
17 @@ -3918,6 +3919,12 @@ static int ext4_fill_super(struct super_
18  
19         bgl_lock_init(sbi->s_blockgroup_lock);
20  
21 +       /* Pre-read the descriptors into the buffer cache */
22 +       for (i = 0; i < db_count; i++) {
23 +               block = descriptor_loc(sb, logical_sb_block, i);
24 +               sb_breadahead(sb, block);
25 +       }
26 +
27         for (i = 0; i < db_count; i++) {
28                 block = descriptor_loc(sb, logical_sb_block, i);
29                 sbi->s_group_desc[i] = sb_bread(sb, block);