Expand description
VFS v2 System Call Interface
This module implements system call handlers for VFS v2, providing the user-space interface to filesystem operations. All system calls follow capability-based semantics and work with the task’s VFS namespace.
§Supported System Calls
§VFS Operations (400-series)
sys_vfs_open()
: Open files and directories (VfsOpen 400)sys_vfs_remove()
: Unified remove for files/directories (VfsRemove 401)sys_vfs_create_file()
: Create regular files (VfsCreateFile 402)sys_vfs_create_directory()
: Create directories (VfsCreateDirectory 403)sys_vfs_change_directory()
: Change working directory (VfsChangeDirectory 404)sys_vfs_truncate()
: Truncate files by path (VfsTruncate 405)
§Filesystem Operations (500-series)
sys_fs_mount()
: Mount filesystems (FsMount 500)sys_fs_umount()
: Unmount filesystems (FsUmount 501)sys_fs_pivot_root()
: Change root filesystem (FsPivotRoot 502)
§Utility Operations
- (deprecated - use VfsCreateFile 402 instead)
§VFS Namespace Isolation
Each task can have its own VFS namespace (Option<Arc
§Error Handling
System calls return usize::MAX (-1) on error and appropriate values on success.
Functions§
- create_
filesystem_ 🔒and_ mount - Create a filesystem using the driver and mount it
- parse_
overlay_ 🔒options - pivot_
root_ 🔒in_ place - Pivot root by replacing the mount tree inside the existing VfsManager
- sys_
fs_ mount - Mount a filesystem (FsMount)
- sys_
fs_ pivot_ root - This system call mounts a filesystem at the specified target path.
- sys_
fs_ umount - Unmount a filesystem (FsUmount)
- sys_
vfs_ change_ directory - Change current working directory using VFS (VfsChangeDirectory)
- sys_
vfs_ create_ directory - Create a directory using VFS (VfsCreateDirectory)
- sys_
vfs_ create_ file - Create a regular file using VFS (VfsCreateFile)
- sys_
vfs_ open - Open a file or directory using VFS (VfsOpen)
- sys_
vfs_ remove - Remove a file or directory (unified VfsRemove)
- sys_
vfs_ truncate - Truncate a file by path (VfsTruncate)
- to_
absolute_ 🔒path_ v2