vms-d69 (P4-VFS V2b): extract ODS-2 allocator + dir scanner + header codec to vmsfs-core over the block/inode seam - #428
Merged
Conversation
…codec to vmsfs-core over the block/inode seam Builds seam #2 (README-backend.md §3): a vmsfs_bio vocabulary (struct vmsfs_volume + vmsfs_bget/bdata/bdirty[_sync]/bput/bit_*/le*_to_cpu/ now_seconds, realized in vmsfs_backend_linux.h) and the vmsfs_fh_info parse/populate split. The storage/FID/cluster allocator (vmsfs_alloc.c), the directory-block scanner (vmsfs_dirscan.c) and the file-header decode/encode (vmsfs_header.c) now live in src/kernel-core/vmsfs/ with 0 <linux/> deps; vmsfs_blkdev.c is the thin VFS + vmsfs_bio backend. Behaviour-preserving restructure (Rule 6/7): oracle is QEMU test_kmod_vmsfs_blkdev + the other vmsfs suites. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…NetBSD checklist Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Builds seam #2 — the block/inode seam designed in
src/kernel/vmsfs/README-backend.md§3 (rdvms-d69, epicvms-8e8), completing the ODS-2 core extraction. The block-coupled ODS-2 logic that still lived invmsfs_blkdev.c— the storage/FID/cluster allocator, the directory-block scanner, and file-header read/write — moves intosrc/kernel-core/vmsfs/, rewritten against a substrate-neutralvmsfs_biovocabulary. After this,src/kernel/vmsfs/is the thin VFS +vmsfs_biobackend; all ODS-2 logic is in the core.The seam as built (vs README §3)
vmsfs_bio(block half, §3a):struct vmsfs_volume(geometry + bitmap + opaquehost) embedded invmsfs_sb_info; opaquestruct vmsfs_bh; opsvmsfs_bget/vmsfs_bdata/vmsfs_bdirty[_sync]/vmsfs_bput,vmsfs_bit_find_zero/set/clear/test,vmsfs_le*_to_cpu/vmsfs_cpu_to_le*,vmsfs_now_seconds— declared in the corevmsfs_bio.h, realized as trivial forwarders invmsfs_backend_linux.h(sb_bread/mark_buffer_dirty/find_next_zero_bit/le*_to_cpu/ktime_get_real_seconds). Mirrors the exec-coreexec_kbackend.hpattern.vmsfs_fh_info(inode half, §3b): POD + purevmsfs_fh_decode/vmsfs_fh_encode; the backend keeps only the thinPOD <-> struct inodecopy.vmsfs_fh_decodereturns anenum vmsfs_fh_status(so the backend reproduces the original's three distinct diagnostics/errnos: EIO magic, EIO checksum, ENOENT not-in-use) rather than a bareint; and flush/rename use explicit partial-update writers (vmsfs_fh_write_meta/vmsfs_fh_write_rename) rather than a decode-on-write, preserving every untouched on-disk field.New core files (0
<linux/>):vmsfs_bio.h,vmsfs_alloc.c,vmsfs_dirscan.c,vmsfs_header.c.Behaviour: ZERO change (Rule 6/7)
Behaviour-preserving restructure; guarantee is BEHAVIOUR, proven by the QEMU oracle.
test_kmod_vmsfs_blkdev+ every vmsfs suite is byte-identical baseline vs after:make -C src/kernel/vmsfscompiles clean before and after.Invariants
src/kernel-core/vmsfs/**has 0<linux/>includes (grep-verified).src/kernel/vmsfs/**contains no ODS-2 allocator/dir/header algorithm — only VFS + thevmsfs_bioimpl. (find_next_zero_bit/set_bit/… gone from the backend;sb_bread/mark_buffer_dirtyremain only as VFS block I/O around core calls.)facility_defects.shanchor repoint needed: its coverage glob iskernel-core/*.c(non-recursive), sokernel-core/vmsfs/*.cis unscanned — consistent with the existing vmsfs core files; thekernel/vmsfsscope-out is unaffected (vmsfs_blkdev.cstays there withvmsfs_blkdev_renameintact).This completes the ODS-2 core extraction. V4 (NetBSD vnode backend, rd
vms-308) can now be written 1:1 against the seam (README §4 checklist updated).🤖 Generated with Claude Code