-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
I think the implemented extent traversal logic is incorrect.
This is not documented anywhere but ext4_extent_idx structs after the ext4_extent_header are sorted by the ei_block.
The current logic picks the ext4_extent_idx which satisfies ext4_extent_idx.ei_block < file_block_no but that will always choose the first ext4_extent_idx struct. This will lead to incorrect results for larger files.
The linux kernel implementation does a binary search: look at ext4_ext_binsearch_idx.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels