diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-06 05:29:12 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:56 -0400 |
commit | 2640faeb1741db94b717d2678f6cd644f90e3061 (patch) | |
tree | e22afd0d0eb1186592e9caaace85aac0f50e466b /fs/bcachefs/journal_sb.h | |
parent | 511b629aca6007a8784a6005a023dd166ffaa787 (diff) | |
download | lwn-2640faeb1741db94b717d2678f6cd644f90e3061.tar.gz lwn-2640faeb1741db94b717d2678f6cd644f90e3061.zip |
bcachefs: Journal resize fixes
- Fix a sleeping-in-atomic bug due to calling
bch2_journal_buckets_to_sb() under the journal lock.
- Additionally, now we mark buckets as journal buckets before adding
them to the journal in memory and the superblock. This ensures that
if we crash part way through we'll never be writing to journal
buckets that aren't marked correctly.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_sb.h')
-rw-r--r-- | fs/bcachefs/journal_sb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_sb.h b/fs/bcachefs/journal_sb.h index a39192e9f6f4..ba40a7e8d90a 100644 --- a/fs/bcachefs/journal_sb.h +++ b/fs/bcachefs/journal_sb.h @@ -21,4 +21,4 @@ static inline unsigned bch2_sb_field_journal_v2_nr_entries(struct bch_sb_field_j extern const struct bch_sb_field_ops bch_sb_field_ops_journal; extern const struct bch_sb_field_ops bch_sb_field_ops_journal_v2; -int bch2_journal_buckets_to_sb(struct bch_fs *, struct bch_dev *); +int bch2_journal_buckets_to_sb(struct bch_fs *, struct bch_dev *, u64 *, unsigned); |