:::{note} AI Translation Notice
This document was automatically translated by Qwen/Qwen3-8B
model, for reference only.
Source document: kernel/filesystem/overview.md
Translation time: 2025-05-19 01:41:36
Translation model: Qwen/Qwen3-8B
Please report issues via Community Channel
:::
:::{note} Author of this article: Long Jin
Email: longjin@DragonOS.org :::
In this article, we will introduce the architecture design of the DragonOS file system.
As shown in the following diagram, the file system-related mechanisms of DragonOS mainly include the following parts:
Specific file systems
┌─────────────────────────────────────────────────┐
│ │
Syscall: │ sys_open, sys_read, sys_write, sys_close, │
│ │
│ sys_lseek, etc.. │
│ │
└───────────────────────┬─────────────────────────┘
│
│
VFS: ┌──────▼─────┐
│ │
│ File │
│ │
└──────┬─────┘
│
┌────────▼────────┐
│ │
│ MountFS │
│ │
└────┬────────────┘
│
Filesystems: ┌─────────────┼─────────────┬────────────┐
│ │ │ │
┌─────▼─────┐ ┌─────▼─────┐ ┌─────▼────┐ ┌─────▼─────┐
│ │ │ │ │ │ │ │
│ FAT │ │ DevFS │ │ ProcFS │ │ RamFS │
│ │ │ │ │ │ │ │
└───────────┘ └───────────┘ └──────────┘ └───────────┘
The file system-related system call interfaces of DragonOS mainly include the following:
sys_open
: Open filesys_read
: Read filesys_write
: Write filesys_close
: Close filesys_lseek
: Set file pointer positionsys_mkdir
: Create directorysys_unlink_at
: Delete file or directory (distinguish between file and directory by parameter flag
)sys_ioctl
: Control device (not implemented)sys_fstat
: Get file status (not implemented)sys_fsync
: Synchronize file (not implemented)sys_ftruncate
: Truncate file (not implemented)sys_fchmod
: Modify file permissions (not implemented)For the specific meaning of the interfaces, you can refer to the relevant documentation of Linux.
VFS is the core of the DragonOS file system, providing a unified set of file system interfaces, allowing DragonOS to support various different file systems. The main functions of VFS include:
For detailed introduction of VFS, please see DragonOS Virtual File System.
The file systems currently supported by DragonOS include: