summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_sb.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-03-06 13:29:12 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:56 +0300
commit2640faeb1741db94b717d2678f6cd644f90e3061 (patch)
treee22afd0d0eb1186592e9caaace85aac0f50e466b /fs/bcachefs/journal_sb.h
parent511b629aca6007a8784a6005a023dd166ffaa787 (diff)
downloadlinux-2640faeb1741db94b717d2678f6cd644f90e3061.tar.xz
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.h2
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);