feat(kernel): Artemis grows to fill the stick at its first boot -- metadata only, capped at 256 GiB (#92, Task 2)
Task 2 of plan 2026-10-29-stick-5, accepted in full: - amd64, aarch64, riscv64: PARITY:V4_POST tests=538 pass=538 fail=0, POST: PASSED, [zuse@Hera] ok>; dict_hash 0xfec8c47cfc6f437f on the three - the PC stick loaded high: 538/538, POST: PASSED, the prompt - make -C v4 test-32: 39 programs, 0 failures The acceptance boots' logs, the accept-*.txt verdicts and test-32's output (logs/20261108-123847/verdicts/). The plan's Task 2 steps ticked; FABRIC-3 XLVIII.9, with one item for a ruling: blk_flush rewrites the whole BAM, now sized for 256 GiB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
This commit is contained in:
@@ -6334,3 +6334,35 @@ Plan `docs/v4.0.0/plans/2026-10-29-stick-5-proxy-zuse-and-real-zuse.md`, Task 1;
|
||||
test-32`): `PARITY:V4_POST tests=538 pass=538 fail=0` and `POST: PASSED` on all three and the
|
||||
stick loaded high; `dict_hash 0xfec8c47cfc6f437f` on the three, unchanged (Task 1 adds no word);
|
||||
test-32: 39 programs, 0 failures.
|
||||
|
||||
### 9. #92, Task 2: Artemis grows to fill the stick (2026-11-08)
|
||||
|
||||
Plan `2026-10-29-stick-5`, Task 2; `STICK.md` 5a (its 2 TiB cap amended to 256 GiB, R1).
|
||||
|
||||
- **Built:** a GPT writer (`gpt_grow_last`, `kernel/src/gpt.c`): the backup entry array and header
|
||||
moved to the disk's end, the last partition grown to the last usable sector (whole MiB, capped),
|
||||
both headers' CRCs, the backup written before the primary, the protective MBR's size. The volume
|
||||
grown to its partition (`kernel/src/v4/sk_v4_grow.c`): its fence -- the Artemis signature and
|
||||
Zuse's genesis marker -- moved to the new top, the header written last. Metadata only. The image
|
||||
builder formats the stick's and the data stick's Artemis with a BAM sized for 256 GiB
|
||||
(`mkartemis --bam-for`, 6144 devblocks), so the grown blocks are tracked already.
|
||||
- **Found while building, and followed:** the block subsystem places a volume's fence by its
|
||||
device's size, not by its header (`blk_format_or_load_disk`), so a volume must always fill its
|
||||
partition. The partition is therefore grown no further than the volume's BAM tracks, and the
|
||||
volume grown before Artemis's signature is checked or the disk attached.
|
||||
- **Tested first, seen to fail:** `stick_grow` (a 16 GiB copy) -- no growth, 1137649 user blocks,
|
||||
`sfdisk`: the backup GPT not at the end; `stick_small` (4 GiB) -- no line; `check_images.sh` --
|
||||
the two BAM checks. After: `stick_grow` grows Artemis to 12129370 user blocks and reaches the
|
||||
prompt 8 s after POST; the second boot of the same copy is not grown again and recognises Zuse;
|
||||
`sfdisk --verify`: no errors. `stick_small`: "under 8 GB -- not grown". Regressions pass:
|
||||
`genesis` (three ISAs), `stick_genesis`, `stick_boot`, `stick_zuse`, `two_sticks`,
|
||||
`artemis_unsigned`, `midpull`.
|
||||
- **Accepted:** 538/538 and `POST: PASSED` on the three and the stick loaded high; `dict_hash
|
||||
0xfec8c47cfc6f437f` on the three; test-32: 39 programs, 0 failures.
|
||||
- **For a ruling (not changed):** `blk_flush` rewrites the whole on-disk BAM -- it reads and writes
|
||||
every BAM page (`bam_flush_to_disk`) on each flush of a dirty block -- and attach reads the whole
|
||||
BAM. With the BAM sized for 256 GiB, that is 24 MiB each way per flush, where the 2 GiB Artemis's
|
||||
own BAM was about 140 KiB. Nothing in acceptance flushes a disk block, so it does not show there.
|
||||
Recommended: flush and read only the BAM pages that hold a volume's user blocks (the same bytes
|
||||
on disk, v3's behaviour unchanged); it is shared v3 code, so it waits for Captain Bob.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user