summaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2017-11-08 22:23:20 -0500
committerTheodore Ts'o <tytso@mit.edu>2017-11-08 22:23:20 -0500
commit232530680290ba94ca37852ab10d9556ea28badf (patch)
treecf23ba2b6c563adc685f3b9fee830ac7d202546c /fs/ext4/super.c
parentd77147ff443b255d82c907a632c825b2cc610b10 (diff)
downloadlinux-232530680290ba94ca37852ab10d9556ea28badf.tar.gz
linux-232530680290ba94ca37852ab10d9556ea28badf.tar.bz2
linux-232530680290ba94ca37852ab10d9556ea28badf.zip
ext4: improve smp scalability for inode generation
->s_next_generation is protected by s_next_gen_lock but its usage pattern is very primitive. We don't actually need sequentially increasing new generation numbers, so let's use prandom_u32() instead. Reported-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 3a278faf5868..9f2e3eb5131f 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3982,8 +3982,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
}
sbi->s_gdb_count = db_count;
- get_random_bytes(&sbi->s_next_generation, sizeof(u32));
- spin_lock_init(&sbi->s_next_gen_lock);
timer_setup(&sbi->s_err_report, print_daily_error_info, 0);