diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2026-11-11 16:24:29 +0000 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2026-11-23 15:29:16 -0500 |
| commit | 7ac9b4174f1ec6d0f675fac3244b09aedc0f45a0 (patch) | |
| tree | 42d2d1d5de2e5b40bec40ccf23f14d6ea41176f0 /scripts | |
| parent | 00ab256f98e3a6f313b9ecc6da510f90604fd9e1 (diff) | |
ext4: add KUnit tests for fs/ext4/indirect.c
Add the ext4_indirect_test KUnit suite in fs/ext4/indirect-test.c to
test legacy direct, single-, double-, and triple-indirect block mapping,
truncation, and hole punching in fs/ext4/indirect.c:
- ext4_block_to_path() offset decomposition, boundary distance, and
out-of-range block rejection, plus ext4_ind_trans_blocks() credits
- ext4_ind_map_blocks() read-only lookup across contiguous runs,
EXT4_MAP_BOUNDARY detection, and multi-level hole span calculation
- ext4_ind_map_blocks() allocation and branch splicing across direct,
IND, DIND, and TIND depths
- error handling (out-of-range logical/physical blocks, bigalloc
rejection, indirect read I/O failure, corrupt indirect blockref) and
partial branch allocation unwind freeing intermediate metadata blocks
- ext4_ind_truncate() partial shared-branch truncation, indirect root
detachment, and full truncation to zero
- ext4_ind_remove_space() hole punching within direct blocks, across
mixed levels, and converging on shared IND and DIND blocks
- corrupt block pointer rejection in ext4_clear_blocks() and
ext4_free_branches()
Route indirect block buffer lookups through ext4_sb_getblk(), add a
KUnit static stub redirect to ext4_sb_bread_nofail(), and export the
indirect mapping and truncation entry points for KUnit testing.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
