summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2024-06-24 20:01:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-03 09:54:19 +0300
commitb81c3758c1df0c308ba8b28934fcd63d9dba9c41 (patch)
treeda49078b62d2ec1825b2799b3baeccf3ea4fbf02 /include
parent7a8532b537ca069bbf5ae4890b4f2f79eb856a3a (diff)
downloadlinux-b81c3758c1df0c308ba8b28934fcd63d9dba9c41.tar.xz
jbd2: precompute number of transaction descriptor blocks
commit e3a00a23781c1f2fcda98a7aecaac515558e7a35 upstream. Instead of computing the number of descriptor blocks a transaction can have each time we need it (which is currently when starting each transaction but will become more frequent later) precompute the number once during journal initialization together with maximum transaction size. We perform the precomputation whenever journal feature set is updated similarly as for computation of journal->j_revoke_records_per_block. CC: stable@vger.kernel.org Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Link: https://patch.msgid.link/20240624170127.3253-2-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/jbd2.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 36b627ad5416..8553dc1d0e89 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1084,6 +1084,13 @@ struct journal_s
int j_revoke_records_per_block;
/**
+ * @j_transaction_overhead:
+ *
+ * Number of blocks each transaction needs for its own bookkeeping
+ */
+ int j_transaction_overhead_buffers;
+
+ /**
* @j_commit_interval:
*
* What is the maximum transaction lifetime before we begin a commit?