1.7 KiB
1.7 KiB
Pre13 H03b: qstr block and dirent search
Scope
- Converted
find_target_dirent()anderofs_find_target_block()to accept a boundedstruct erofs_qstrsearch key. - Constructed bounded on-disk qstr objects from the same validated dirent name offsets and block end pointers used before this change.
- Constructed a temporary search qstr inside
erofs_namei()while retaining its original pointer/length external interface for H03c. - Removed the H03a legacy comparator adapter.
No changes were made to dir.c, readdir, cookies, buffer ownership, directory
validation, binary-search decisions, errno selection, cleanup, VOP lookup,
vnode locking, or namecache operations.
Static evidence
erofs_dirnamecmp()has exactly two call sites: the block-level first-name comparison and the candidate block's dirent comparison.- Both on-disk qstr end pointers use the same next
nameoffor validated block boundary as the previous pointer arguments. erofs_find_target_block()retains everyerofs_brelse()path, candidate replacement,EINTEGRITYassignment, andENOENTdistinction.erofs_namei()still releases the selected block once and returnsENOENTonly for a true miss.- The
erofs_lookup()control flow and allcache_enter(),vn_vget_ino(),erofs_vget(), andcn_lkflagsuses are outside this stage's diff.
Comparator gate
Tests baseline: ce03c283e6e2cb8f1b69c8eff21f7d06098a4fbe.
- Python deterministic corpus: PASS, 11,562 cases.
- Independent C harness: PASS, 1,048,576 cases.
The comparator gates are host static-equivalence evidence, not dynamic feature tests. H03 still requires TC042, TC043, TC044, TC045, TC053, TC054, TC123, TC141, and TC148, followed by the final smoke test.