Commit ad68953d authored by Jan Kara's avatar Jan Kara Committed by Yang Yingliang
Browse files

jbd2: Account descriptor blocks into t_outstanding_credits



mainline inclusion
from mainline-5.5-rc1
commit 9f356e5a
category: bugfix
bugzilla: 25031
CVE: NA
---------------------------

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: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191105164437.32602-18-jack@suse.cz


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>

Conflict:
  include/linux/jbd2.h

Signed-off-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: default avatarYang Erkun <yangerkun@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 24b3a1a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment