Skip to content

[ISSUE] Phase 3: Extended VFS, Positional/Vectored I/O, and Filesystem Metadata Syscalls #281

Todo
0 of 3 issues completed

Description

@marcobuschini

Parent Epic

#265

Blocked By / Dependencies

None (can execute in parallel with Phases 1–2)

Problem Statement & Context

Milo currently supports core VFS syscalls (openat, read, write, writev, lseek, fstat, newfstatat, readlinkat, mkdirat, unlinkat, renameat/renameat2, truncate/ftruncate, fchmod*, fchown*, utimensat, fsync/fdatasync, getdents64). Real-world Linux CLI utilities (coreutils, tar, git, dpkg, SQLite, editors, compilers) additionally depend on positional/vectored I/O (readv, pread64, pwrite64, preadv*, pwritev*), extended filesystem/inode metadata (statx, statfs, fstatfs, symlinkat, linkat, mknodat), file transfer/locking/allocation (sendfile, copy_file_range, splice, flock, fallocate, sync/syncfs), and clean *xattr boundary semantics.

Scope & Technical Touchpoints

In Scope

  • Positional & vectored I/O: readv (65), pread64 (67), pwrite64 (68), preadv (69), pwritev (70), preadv2 (286), pwritev2 (287)
  • Metadata & namespace operations: mknodat (33), symlinkat (36), linkat (37), statfs (43), fstatfs (44), statx (291)
  • File transfer, advisory locking, allocation & xattr boundaries: flock (32), fallocate (47), sendfile (71), splice (76), sync (81), syncfs (267), copy_file_range (285), and *xattr (5–16) explicit -EOPNOTSUPP/-ENODATA handling

Technical Touchpoints

  • kernel/uapi/fs.hpp, kernel/uapi/errno.hpp
  • kernel/fs/Inode.hpp, kernel/fs/Vfs.hpp, kernel/fs/Vfs.cpp
  • kernel/fs/tmpfs/tmpfs.cpp, kernel/fs/ext2/ext2.cpp, kernel/fs/rootfs/rootfs.cpp, kernel/fs/devfs/devfs.cpp
  • kernel/syscalls/FileSyscalls.cpp, kernel/syscalls/SyscallInternal.hpp, kernel/syscalls/SyscallDispatcher.cpp
  • tests/host/, kernel/shell/tests/

Out of Scope

  • mount/umount2/chroot/pivot_root (Phase 5)
  • inotify_* (Phase 6)

Split Verdict: SPLIT

Rationale: Phase 3 spans three distinct layers—stateless positional/vectored I/O in FileSyscalls.cpp, VFS/filesystem-driver metadata & link operations across tmpfs/ext2/rootfs/devfs, and higher-level transfer/locking/allocation/xattr syscalls. Splitting into 3 ordered subissues keeps each PR cohesive and reviewable.

Subissues

Acceptance Criteria

  • All Phase 3 syscalls match Linux AArch64 LP64 UAPI structs and errno semantics (ESPIPE, EXDEV, EOPNOTSUPP, EINVAL, EFAULT)
  • Zero VFS inode/dentry/file or PFA frame leaks across tmpfs, ext2, devfs, and rootfs
  • Host Snitch ASan/UBSan tests in tests/host/ and QEMU shell tests pass cleanly
  • make format && make clean-tests && make -j"$(nproc)" all && make -j"$(nproc)" quality passes with zero warnings

Sub-issues

Sub-issues

0 of 3 Issues completed
Loading 3 sub-issues

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions