diff options
author | Jan Kara <jack@suse.cz> | 2024-07-01 15:28:00 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2024-07-08 23:59:37 -0400 |
commit | a794c9ad026f0a28044347f31929fcdb0270eadc (patch) | |
tree | dd3fc32b93e016e53319e0127f008324a25582bd /fs/jbd2 | |
parent | 1cf5b024a3ffa479ed14e520f81549fce037f322 (diff) | |
download | linux-a794c9ad026f0a28044347f31929fcdb0270eadc.tar.gz linux-a794c9ad026f0a28044347f31929fcdb0270eadc.tar.bz2 linux-a794c9ad026f0a28044347f31929fcdb0270eadc.zip |
jbd2: increase maximum transaction size
Originally, we were quite conservative in limiting maximum transaction
size to a quarter of the journal because we were not accounting
transaction descriptor and revoke blocks. These days we do properly
account them and reserve space for them from the total transaction
credits. Thus there's no need to be so conservative and we can increase
the maximum transaction size to one third of the journal (even half
should work fine in principle but the performance will likely suffer in
that case). This also fixes failures to grow filesystems with tiny
journals.
Link: CA+hUFcuGs04JHZ_WzA1zGN57+ehL2qmHOt5a7RMpo+rv6Vyxtw@mail.gmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20240701132800.7158-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
-rw-r--r-- | fs/jbd2/journal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 25d373fac2f2..1ebf2393bfb7 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1429,7 +1429,7 @@ static int journal_revoke_records_per_block(journal_t *journal) static int jbd2_journal_get_max_txn_bufs(journal_t *journal) { - return (journal->j_total_len - journal->j_fc_wbufsize) / 4; + return (journal->j_total_len - journal->j_fc_wbufsize) / 3; } /* |