vms-c60: ACP answers IO$_READVBLK / IO$_WRITEVBLK (virtual-block I/O, implicit extend, epic vms-208) - #640
Merged
Merged
Conversation
… implicit extend, epic vms-208) Fifth rung of the Files-11 ODS-2 ACP-in-the-executive (epic vms-208), stacked on the IO$_ACCESS window rung (#633). The ACP now services virtual-block transfers on an accessed file channel, mapping {VBN, byte-offset, length} through the channel window to LBN block I/O over a real /dev/vms. - IO$_READVBLK (ioctl 0x6D): read through the window, clamped at EOF; byte-exact vs the userspace codec golden. Read past EOF -> SS$_ENDOFFILE. - IO$_WRITEVBLK (ioctl 0x6E): write through the window; a write past the file's highest allocated VBN triggers an IMPLICIT EXTEND -- allocate the shortfall from BITMAP.SYS, append an FM2 retrieval pointer to the file's FH2, grow HIBLK/EOF, reseal the header, extend the channel window. Read-only channel -> SS$_NOPRIV; no free run -> SS$_DEVICEFULL; bad offset -> SS$_BADPARAM. Clean-room (Rule 8): every on-disk format op (FM2 map append, RECATTR EOF/HIBLK, storage-bitmap bit alloc, FH2 checksum) is a PURE codec helper in the new ods2/ods2_edit.c; vmsfs_acp.c only sequences the raw exec_blockdev_read/write block I/O around them -- the same shape #633's IO$_ACCESS uses. exec_kbackend gains a write twin (exec_blockdev_write_block) with a NetBSD contract-only stub. Rule 9 / INV-6: executive-resident, fail-honest, proven against a real /dev/vms. New test_syssvc_acp_rw.c: 20/20 PASS on the QEMU kernel-executive harness (read byte-exact vs golden, in-place round-trip, past-EOF extend with BITMAP.SYS alloc + FH2 grow + persisted read-back, all fail-honest edges). Negctl anchor acp-writevb-extend-alloc-offbyone (facility_defects.sh, FLOOR-NO-BUMP). Codec use gated behind OVMX_ODS2_KERNEL; the codec-free bootable overlay compiles vmsfs_acp.o with zero ods2_ references (dual-build verified). New executive kif symbols appended to src/vmslink/libvmssys_shr.vec (append-only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
6 tasks
baron-3dl
added a commit
that referenced
this pull request
Aug 17, 2026
… cross-build (#643) * vms-6a7f: wire vmsfs_acp.c (Files-11 ACP handlers) onto the elf32-vax cross-build The elf32-vax ILP32 convergence guard (build-vms-module-vax.sh) proved every executive facility EXCEPT the Files-11 ODS-2 ACP -- vmsfs_acp.c and its ods2_edit.c EDIT helpers were never compiled for a 32-bit target at all, so LP64 Alpha was the only cross-arch signal on the ACP handlers and could not catch an ILP32 width regression. This closes that gap: - src/vmsfs/include/vmsfs/ods2.h: the OVMX_ODS2_KERNEL type-substrate include is now three-way (Linux / NetBSD kernel / userspace), the same split src/kernel/vmsfs/vmsfs_ondisk.h already carries (rd vms-9172/vms-bbf) and the same __linux__/__KERNEL__ detection vmsfs_backend.h uses. The NetBSD kernel branch is self-sufficient for offsetof (a guarded __builtin_offsetof fallback), since ods2_edit.c compiles as its own standalone TU and does not transitively pull <sys/systm.h>. - src/kernel-netbsd/vms_internal.h: add struct vms_proc::file_channels (mirrors mbx_channels), the 6 missing SS$ status codes vmsfs_acp.c returns (ACCVIO/DEVNOTMOUNT/NOSUCHFILE/FILNOTACC/DEVICEFULL/DEVALLOC, values copied verbatim from src/kernel/vms_internal.h so both substrates agree), ACP facility prototypes, and the vms_devtab_disk_backing() forward declaration (device table is not ported to NetBSD yet -- a later, separate port). - src/kernel-netbsd/vms_acp_nb.h (new): the NetBSD twin of src/kernel/ vms_acp.h's ioctl arg structs, byte-identical layouts, mirroring the vms_mbx_nb.h precedent. - src/kernel-netbsd/vms_netbsd.c: initialize file_channels alongside mbx_channels (release-all is deliberately NOT wired -- vmsfs_acp.c is not in the real module SRCS yet). - tools/cross-vax/build-vms-module-vax.sh: add vmsfs_acp.c + ods2_edit.c to the compile set (-DOVMX_ODS2_KERNEL), a deliberate superset of src/kernel-netbsd/Makefile's real SRCS. SCOPE: compile-coverage only, not runtime integration (vmsfs_acp.c is not linked into the real NetBSD/vax loadable module or dispatched by vms_netbsd.c's ioctl table -- that re-target is vms-d5d). Verified: all 14 TUs (the prior 12 + vmsfs_acp.c + ods2_edit.c) compile -Werror clean for elf32-vax and relocatable-link with no duplicate symbols; every object confirmed elf32-vax/arch:vax. Retroactively covers the whole accumulated ACP handler layer on main (mount/dmount/assign #631, access/deaccess #633, readvb/writevb #640). Negctl (deliberately-broken TU) still fails the gate. Sibling gates unaffected: build-vmsfs-core-vax.sh (codec, vms-bb8) and build-vmsfs-mount-vax.sh (loadable vmsfs.kmod) both still pass. Linux regression check: vms.ko (src/kernel/Makefile) builds clean against a real 6.8.0 kernel with vmsfs_acp.o/ods2_reader.o/ods2_edit.o all compiling under the unchanged Linux branch of the new ods2.h split. No width issue found (compile clean; the args.buffer uint64_t->uintptr_t->void* casts in READVBLK/WRITEVBLK are correct on ILP32). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * vms-6a7f: stage vms_acp_nb.h in tests/netbsd/Dockerfile for the in-guest amd64 module build The new src/kernel-netbsd/vms_acp_nb.h (ACP ioctl arg-struct NetBSD twin) is referenced by vms_internal.h, so the NetBSD/amd64 in-guest module build needs it staged — but the Dockerfile's kmod header COPY list (which stages the sibling *_nb.h headers) missed it, failing the "NetBSD/amd64 vms module cross-compiles" staging check. Add the COPY line next to vms_mbx_nb.h, the header it mirrors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Aug 22, 2026
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.
Fifth rung of the Files-11 ODS-2 ACP-in-the-executive (epic vms-208). Builds on the IO$_ACCESS window rung #633 (vms-204), which is already merged to
main— this branch was rebased ontoorigin/main(additive, no conflicts).The model
The ACP now services virtual-block transfers on an ACCESSED file channel, mapping
{VBN, byte-offset, length}through the channel's window (built by IO$_ACCESS) to LBN block I/O over a real/dev/vms.0x6D): read through the window, clamped at EOF. Byte-exact vs the userspace codec. Read starting past EOF →SS$_ENDOFFILE.0x6E): write through the window to the mapped LBNs. A write whose end lies past the file's highest allocated VBN triggers an implicit EXTEND — allocate the shortfall from BITMAP.SYS, append an FM2 retrieval pointer to the file's FH2, grow HIBLK/EOF, reseal the header checksum, extend the channel window. Read-only channel →SS$_NOPRIV; no free run →SS$_DEVICEFULL; bad offset →SS$_BADPARAM.(
0x6Fleft reserved for IO$_ACPCONTROL / wildcard$SEARCH.)Byte-exact proof — real
/dev/vms(QEMU kernel-executive harness), 20/20 PASStests/qemu/test_syssvc_acp_rw.c, over the real-VAX ODS-2 fixture on DKA0::[OVMXDIR]HELLO.TXTbyte-exact vs the committed codec golden.extended=1,HIBLK 35,EOF 35; after re-ACCESS the FH2 reports the grown size and VBN 35 reads back byte-exact — a real BITMAP.SYS block was allocated and the retrieval map grew, on disk.SS$_ENDOFFILE; write-to-read-only-channel →SS$_NOPRIV; bad offset →SS$_BADPARAM.The full harness ran green (87 suites passed, 0 failed) on this branch's predecessor source; the only delta to the final commit is an
ODS2_BLOCK_SIZE→ACP_BLOCK_SIZErename (same value, 512, made the codec-free path independent of the gated header) plus a comment fix — CI re-verifies the final source.Clean-room (Rule 8)
Every on-disk format operation (FM2 map append, RECATTR EOF/HIBLK, storage-bitmap bit alloc, FH2 checksum) is a pure codec helper in the new
src/vmsfs/ods2/ods2_edit.c— the write-side twins of the reader's pure parsers.vmsfs_acp.conly sequences the raw block I/O around them, exactly as #633's IO$_ACCESS sequences the pure parse helpers.exec_kbackendgains a write twinexec_blockdev_write_block(Linux bio; NetBSD contract-only stub).Dual-build (codec-free overlay must still link — #623 class)
All codec use is gated behind
OVMX_ODS2_KERNEL. Verified BOTH:make -C src/kernel(with codec) →vms.kobuilds + modposts clean;vmsfs_acp.o(overlay mode, no codec) → clean, andnmshows zeroods2_references (no dangling symbol).ods2_edit.ostays out of the bootable overlay, likeods2_reader.o.Cascade compliance
vms_kif_acp_readvb/_writevbappended tosrc/vmslink/libvmssys_shr.vec(append-only);symvec_freeze_gate+kif_caller_censusgreen (OVMX-UNWIRED declared).acp-writevb-extend-alloc-offbyoneinfacility_defects.sh(a real FM2 map-append LBN off-by-one the suite's re-ACCESS read-back catches); FLOOR-NO-BUMP;coverage+selftestpass.env_identity_census_negctlis the documented ~180s flake vms-3f9 under concurrent build load — passes in isolation).Concurrency note: the extend's allocate/RMW span is single-writer for now (stated, not faked); the per-volume DLM synchronization lock (vms-233, a later rung) is the VMS-authentic serialization and supersedes this.
🤖 Generated with Claude Code