Re: [PATCH 0/4] ocfs2: consolidate extent list validation into block read callbacks

From: Andrew Morton

Date: Fri Apr 03 2026 - 15:27:44 EST


On Fri, 3 Apr 2026 17:07:59 +0800 Joseph Qi <joseph.qi@xxxxxxxxxxxxxxxxx> wrote:

> ocfs2 validates extent list fields (l_count, l_next_free_rec) at various
> points during extent tree traversal. This is fragile because each caller
> must remember to check for corrupted on-disk data before using it.
>
> This series moves those checks into the block read validation callbacks
> (ocfs2_validate_dx_root and ocfs2_validate_extent_block), so corrupted
> fields are caught early at block read time. Redundant post-read checks
> are then removed.

AI review asked a few questions - mainly suggesting additional changes.
https://sashiko.dev/#/patchset/20260403090803.3860971-1-joseph.qi@xxxxxxxxxxxxxxxxx