* feat(procfs): Add /proc/[pid]/mountinfo and /proc/[pid]/maps support
- Introduced new ProcFileType variants for /proc/[pid]/mountinfo and /proc/[pid]/maps.
- Implemented content generation for /proc/[pid]/mountinfo and /proc/[pid]/maps to align with Linux semantics.
- Updated ProcFS inode creation to include these new files for each process.
- Enhanced path handling in the VFS to ensure correct resolution based on process-specific root and current working directory.
This addition improves the process filesystem's functionality and compatibility with Linux behavior.
* feat(filesystem): Enhance page cache management in tmpfs
- Added an unevictable flag to the PageCache structure, allowing pages to be marked as unevictable to prevent reclamation.
- Updated the TmpfsInode structure to integrate page cache management, replacing direct data manipulation with page cache operations for read and write methods.
- Refactored truncate and resize methods to utilize the new page cache functionality, ensuring consistency and improved memory management.
* feat(filesystem): Enhance tmpfs functionality and VFS constraints
- Implemented support for readahead in tmpfs, allowing for optimized data retrieval.
- Added checks for filename length across various VFS operations to prevent errors related to excessively long names.
- Updated the tmpfs implementation to handle read and write operations directly through the page cache, improving memory management.
- Enhanced rename functionality to ensure type compatibility and empty directory checks during operations.
- Increased maximum path length and defined maximum single filename length for better filesystem compliance.
* refactor(fs): 重构tmpfs重命名逻辑并修复MountFSInode的move_to委托
- 将tmpfs跨目录移动逻辑提取为独立函数`tmpfs_move_entry_between_dirs`
- 优化锁顺序以避免死锁,按inode_id顺序锁定目录
- 修复MountFSInode::move_to中目标inode解包问题,确保正确委托给底层文件系统
Signed-off-by: longjin <longjin@DragonOS.org>
* feat(filesystem): Implement zero-page creation for tmpfs and enhance page fault handling
- Added `create_zero_pages` method to `InnerPageCache` for efficient zero-page creation, optimizing memory usage in tmpfs.
- Updated `Tmpfs` to utilize the new zero-page creation during read and write operations, ensuring seamless handling of page faults.
- Enhanced `PageFaultHandler` with `pagecache_fault_zero` to manage page faults specifically for tmpfs, allowing for direct page cache access without disk I/O.
This improves the performance and reliability of memory file systems by reducing unnecessary allocations and ensuring proper page management.
* refactor(syscall): Rename check_and_clone_cstr to vfs_check_and_clone_cstr for clarity
- Updated the user access module to introduce vfs_check_and_clone_cstr, enhancing clarity in its purpose for VFS operations.
- Refactored sys_openat and utimensat to utilize the new vfs_check_and_clone_cstr function, ensuring consistent handling of C string paths across the filesystem.
---------
Signed-off-by: longjin <longjin@DragonOS.org>