[lvc-project] [PATCH] ocfs2: consistently validate extent lists in __ocfs2_find_path()

Dmitry Antipov dmantipov at yandex.ru
Fri Dec 19 12:36:27 MSK 2025


On Fri, 2025-12-19 at 12:28 +0800, Heming Zhao wrote:


> As I mentioned in another thread [1], all __ocfs2_find_path() operations occur
> in memory

Hm. AFAICS __ocfs2_find_path() calls ocfs2_read_extent_block() at least.

Catching bogus zero values is easy (well, at least in this particular case).
But an intension of my my patch was to catch all bogus values. IIUC an on-disk
length of an extent list should be equal to ocfs2_extent_recs_per_eb(...) for
an extent block and ocfs2_extent_recs_per_inode_with_xattr(...) for the regular
inode, and it's hardly possible to check the latest without reading the full
inode block.

Dmitry



More information about the lvc-project mailing list