bcachefs: Journal resize fixes
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 6 Mar 2023 10:29:12 +0000 (05:29 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:56 +0000 (17:09 -0400)
commit2640faeb1741db94b717d2678f6cd644f90e3061
treee22afd0d0eb1186592e9caaace85aac0f50e466b
parent511b629aca6007a8784a6005a023dd166ffaa787
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>
fs/bcachefs/buckets.c
fs/bcachefs/journal.c
fs/bcachefs/journal_sb.c
fs/bcachefs/journal_sb.h