Re: [PATCH v2] ext4: return an error when a journal block is not mapped

From: Theodore Ts'o

Date: Thu Nov 19 2026 - 09:49:35 EST



On Fri, 16 Oct 2026 12:37:26 +0200, Karl Mehltretter wrote:
> If the internal journal inode contains a hole, ext4_map_blocks() returns
> 0. ext4_journal_bmap() logs "journal bmap failed" and aborts the
> journal, but also returns 0 and leaves *block unchanged.
>
> jbd2_journal_bmap() takes that as success and uses the unchanged logical
> journal block number as a physical filesystem block number. Journal I/O
> can then overwrite filesystem blocks outside the journal despite the
> abort.
>
> [...]

Applied, thanks!

[1/1] ext4: return an error when a journal block is not mapped
commit: 5fbfd161f88e6027338766014a268a19e4aa6607

Best regards,
--
Theodore Ts'o <tytso@xxxxxxx>