diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-02-03 13:10:55 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:52 -0400 |
commit | 4b8f89afd44592d50f7309750e7835fc777dfb08 (patch) | |
tree | 0b93ad735f3b5438b42b9fc2eb8b8a82fee49920 /fs/bcachefs/replicas.c | |
parent | 91f6ad6f947c96545eb7790569b279fdeac06153 (diff) | |
download | linux-4b8f89afd44592d50f7309750e7835fc777dfb08.tar.gz linux-4b8f89afd44592d50f7309750e7835fc777dfb08.tar.bz2 linux-4b8f89afd44592d50f7309750e7835fc777dfb08.zip |
bcachefs: Fixes/improvements for journal entry reservations
This fixes some arithmetic bugs in "bcachefs: Journal updates to dev
usage" - additionally, it cleans things up by switching everything that
goes in every journal entry to the journal_entry_res mechanism.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/replicas.c')
-rw-r--r-- | fs/bcachefs/replicas.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bcachefs/replicas.c b/fs/bcachefs/replicas.c index e5e437deb9ab..bf1804c10bfb 100644 --- a/fs/bcachefs/replicas.c +++ b/fs/bcachefs/replicas.c @@ -1074,8 +1074,9 @@ unsigned bch2_dev_has_data(struct bch_fs *c, struct bch_dev *ca) int bch2_fs_replicas_init(struct bch_fs *c) { - c->journal.entry_u64s_reserved += - reserve_journal_replicas(c, &c->replicas); + bch2_journal_entry_res_resize(&c->journal, + &c->replicas_journal_res, + reserve_journal_replicas(c, &c->replicas)); return replicas_table_update(c, &c->replicas); } |