bcachefs: Ensure journal space is block size aligned
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 18 Apr 2025 20:42:50 +0000 (16:42 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 20 Apr 2025 23:41:38 +0000 (19:41 -0400)
commit6468aef231890806ccc4e921b111ff9275880832
treeb86973bd8fc3e5212d58605ab96dc445441856d6
parent71f8e806a5e4edada72456ee3b2e2d7eab6fadee
bcachefs: Ensure journal space is block size aligned

We don't require that bucket size is block size aligned (although it
should be!) - so we need to handle this in the journal code.

This fixes an assertion pop in jorunal_entry_close(), where the journal
entry overruns available space - after rounding it up to block size.

Fixes: https://github.com/koverstreet/bcachefs/issues/854
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal_reclaim.c