journal: increase revoke block hash size
Increase the size of the revoke block hash table to scale with the
size of the journal, so that we don't get long hash chains if there
are a large number of revoke blocks in the journal to replay.
The new hash size will default to 1/16 of the blocks in the journal.
This is about 1 byte per block in the hash table, but there are two
allocated. The total amount of memory allocated for revoke blocks
depends much more on how many are in the journal, and not on the size
of the hash table. The system is regularly using this much memory
for the journal blocks, so the hash table size is not a big factor.
Consolidate duplicate code between recover_ext3_journal() and
ext2fs_open_ext3_journal() in debugfs.c to avoid duplicating logic.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: Ibadf2a28c2f42fa92601f9da39a6ff73a43ebbe5
Reviewed-on: https://review.whamcloud.com/52386
Link: https://lore.kernel.org/r/20250125004220.44607-2-adilger@whamcloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>