diff options
| author | Harshad Shirwadkar <[email protected]> | 2020-11-06 03:58:54 +0000 |
|---|---|---|
| committer | Theodore Ts'o <[email protected]> | 2020-11-07 04:01:02 +0000 |
| commit | ede7dc7fa0af619afc08995776eadb9ff3b0a711 (patch) | |
| tree | d1a6596d27bca10f74edfa11fa4ae287c24147d8 /fs/jbd2/commit.c | |
| parent | ext4: fixup ext4_fc_track_* functions' signature (diff) | |
| download | kernel-ede7dc7fa0af619afc08995776eadb9ff3b0a711.tar.gz kernel-ede7dc7fa0af619afc08995776eadb9ff3b0a711.zip | |
jbd2: rename j_maxlen to j_total_len and add jbd2_journal_max_txn_bufs
The on-disk superblock field sb->s_maxlen represents the total size of
the journal including the fast commit area and is no more the max
number of blocks available for a transaction. The maximum number of
blocks available to a transaction is reduced by the number of fast
commit blocks. So, this patch renames j_maxlen to j_total_len to
better represent its intent. Also, it adds a function to calculate max
number of bufs available for a transaction.
Suggested-by: Jan Kara <[email protected]>
Signed-off-by: Harshad Shirwadkar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
| -rw-r--r-- | fs/jbd2/commit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index fa688e163a80..ec516490cb35 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -801,7 +801,7 @@ start_journal_io: if (first_block < journal->j_tail) freed += journal->j_last - journal->j_first; /* Update tail only if we free significant amount of space */ - if (freed < journal->j_maxlen / 4) + if (freed < jbd2_journal_get_max_txn_bufs(journal)) update_tail = 0; } J_ASSERT(commit_transaction->t_state == T_COMMIT); |
