Skip to content

+ Tux3 writer, proven by the linux-tux3 kernel - #1104

Open
Hawkynt wants to merge 1 commit into
mainfrom
feat/tux3-kernel-oracle
Open

Hawkynt wants to merge 1 commit into
mainfrom
feat/tux3-kernel-oracle

Conversation

@Hawkynt

@Hawkynt Hawkynt commented Nov 25, 2026

Copy link
Copy Markdown
Owner

What changed

Tux3 (revision 2015-06-01) gets a writer, and the linux-tux3 kernel becomes its oracle.

  • Tux3Writer + IArchiveCreatable on the descriptor (CanCreate): volumes laid out as the kernel and tux3 mkfs lay them out — contiguous runs behind direct data-tree roots (a data leaf past the 15-bit count), ext2-style entry blocks, inode leaves under one index node, allocation as the BALLOC log records the kernel replays at mount. Directories, files, symlinks, hard links, FIFOs/sockets/devices, owner/mode/mtime.
  • Reader reports device numbers (Tux3Node.Device).
  • Compression.Tests/Tux3/KernelOracle/kernel-run.sh boots the kernel under QEMU (1 GiB); kernel.img.gz is a volume the kernel filled, with its read-back manifest (kernel-gen.sh).
  • Docs: docs/TUX3-ON-DISK.md gains "Writing" and "Kernel oracle"; FS README row, catalogue.

Oracle (built from source, nothing GPL committed)

linux-tux3 branch hirofumi, commit e1c4179dd161 (Linux 5.16 + fs/tux3), defconfig + kvm_guest.config, Tux3 and virtio built in, gcc 12, -j2. Build-only objtool tweaks (warnings not errors; object without symbol table = no symbols) are described in the docs.

Verification

  • The kernel-written volume (every object kind, index changes still in the log) reads exactly as the kernel lists and reads it.
  • The kernel mounts writer volumes (direct roots and forced data leaves, 400-entry directory over several inode leaves, devices incl. the wide encoding, links, owner/mode/mtime) and reads every object back byte for byte.
  • After the kernel writes, appends, links, renames and removes in a writer volume, the reader matches the kernel's read-back.
  • FullyQualifiedName~Tux3|Catalogue|Readme green; kernel tests skip where the kernel is not built.

Tux3 was read-only because no tool could judge a written volume: the
user tools are unreliable writers (tux3fuse aborts on 4 KiB writes,
tux3 write leaves larger files empty).

The linux-tux3 kernel (branch hirofumi, commit e1c4179dd161, Linux 5.16
with fs/tux3) is now built from source as an oracle (oracle-only, nothing
committed; build-only objtool tweaks recorded in docs/TUX3-ON-DISK.md) and
booted under QEMU by Compression.Tests/Tux3/KernelOracle/kernel-run.sh.

Tux3Writer lays volumes out as the kernel and tux3 mkfs do: contiguous runs
behind direct data-tree roots (a data leaf past the 15-bit count), ext2-style
entry blocks, inode leaves under one index node, and the allocation as the
BALLOC log records the kernel replays at mount. The reader now also reports
device numbers.

Evidence: a volume the kernel filled (kernel.img.gz, every object kind, index
changes still in the log) reads back exactly as the kernel lists it; the
kernel mounts writer volumes (direct roots and data leaves, 400-entry
directory, devices, links, owner/mode/mtime) and reads every object back
byte for byte; after the kernel writes, appends, links, renames and removes
in a writer volume, the reader matches the kernel's read-back.

Sourcing rung 2: the GPL kernel and tools were read as reference and run
as oracles; the on-disk description is in docs/TUX3-ON-DISK.md.
@Hawkynt Hawkynt added the worker:queued Waiting for an idle worker label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

worker:queued Waiting for an idle worker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant