diff options
| author | Jan Kara <jack@suse.cz> | 2025-01-21 15:09:26 +0100 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2025-02-13 00:19:10 -0500 |
| commit | a399af4e3b1ab2c5d83292d4487c4d18de551659 (patch) | |
| tree | c8aeb1808554b093b5eef8b53761d679b3227273 /include/linux | |
| parent | 2890e5e0f49e10f3dadc5f7b7ea434e3e77e12a6 (diff) | |
jbd2: Avoid long replay times due to high number or revoke blocks
Some users are reporting journal replay takes a long time when there is
excessive number of revoke blocks in the journal. Reported times are
like:
1048576 records - 95 seconds
2097152 records - 580 seconds
The problem is that hash chains in the revoke table gets excessively
long in these cases. Fix the problem by sizing the revoke table
appropriately before the revoke pass.
Thanks to Alexey Zhuravlev <azhuravlev@ddn.com> for benchmarking the
patch with large numbers of revoke blocks [1].
[1] https://lore.kernel.org/all/20250113183107.7bfef7b6@x390.bzzz77.ru
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20250121140925.17231-2-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/jbd2.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 053444f7a1d0..82ef232935c0 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -1621,6 +1621,8 @@ extern void jbd2_journal_destroy_revoke_record_cache(void); extern void jbd2_journal_destroy_revoke_table_cache(void); extern int __init jbd2_journal_init_revoke_record_cache(void); extern int __init jbd2_journal_init_revoke_table_cache(void); +struct jbd2_revoke_table_s *jbd2_journal_init_revoke_table(int hash_size); +void jbd2_journal_destroy_revoke_table(struct jbd2_revoke_table_s *table); extern void jbd2_journal_destroy_revoke(journal_t *); extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *); |
