The idea was to have an allocator that uses better the locality information and would be better suited for extents and it ended being similar to what linux calls a multiblock allocator in a paper from 2005.
I have never seem the code and I doubt the specific implementation has any similarity.
Implement ext2_alloc_run() — a multi-block physical allocator that
reserves a contiguous physical block run and returns it via a
context-based state machine:
ALLOCATED -> MAPPED -> PUBLISHED -> ROLLED_BACK
ext2_alloc_run() enforces the reserved-block policy using struct
ucred *cred (NOCRED panics under INVARIANTS). Callers include
ext2_alloc() and ext4_new_blocks() for block allocation.
ext4_ext_split() uses scalar ext2_rollback_unpublished() for metadata
block cleanup (no context arrays). ext4_ext_insert_extent() handles
MAPPED -> PUBLISHED state transitions with the context on extent
insertion success.
The allocation context tracks only essential state:
- physical run (start + length)
- lifecycle state (4 values)
- accounting_applied (needed for ALLOCATED -> ROLLED_BACK)
Note 1: I used poolside/laguna-s-2.1:free AI to help the implementation of this algorithm,
It was instructed specifically NOT to take code from linux. Plus I had to review an fix it several times.
Note 2: I have a WIP implementation of softupdates on top of it.