]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
jbd2: Account descriptor blocks into t_outstanding_credits
authorJan Kara <jack@suse.cz>
Tue, 5 Nov 2019 16:44:24 +0000 (17:44 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 5 Nov 2019 21:00:48 +0000 (16:00 -0500)
commit9f356e5a4f12008fa0df8b6385fc0ab830416e72
tree6ec4a24cc440123cd810bf520c609d01abe0ebd3
parentec8b6f600e49dc87a8564807fec4193bf93ee2b5
jbd2: Account descriptor blocks into t_outstanding_credits

Currently, journal descriptor blocks were not accounted in
transaction->t_outstanding_credits and we were just leaving some slack
space in the journal for them (in jbd2_log_space_left() and
jbd2_space_needed()). This is making proper accounting (and reservation
we want to add) of descriptor blocks difficult so switch to accounting
descriptor blocks in transaction->t_outstanding_credits and just reserve
the same amount of credits in t_outstanding credits for journal
descriptor blocks when creating transaction.

Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191105164437.32602-18-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/commit.c
fs/jbd2/journal.c
fs/jbd2/transaction.c
include/linux/jbd2.h