summaryrefslogtreecommitdiff
path: root/components/dfs/dfs_v2/src
AgeCommit message (Collapse)Author
2026-08-30[dfs][posix] Fix EFAULT, tmpfs setattr, and chmod bitsbernard
NULL read/write buffers now return -EFAULT. tmpfs setattr uses the vnode-backed object after unlink, keeps S_ISUID/S_ISGID/S_ISVTX, and the tmpfs utest checks ENAMETOOLONG plus post-unlink fchmod.
2026-08-30[dfs][posix] Add record locks, fchmod, and tmpfs metadatabernard
为 DFS v2 增加 POSIX 记录锁、fchmod,以及 tmpfs 的权限和时间元数据。 进程退出时通过 dfs_fdtable_drop_fd 释放文件描述符和记录锁。
2026-08-26[finsh] Remove deprecated FINSH_FUNCTION_EXPORT_ALIAS#11734Bernard Xiong
2026-08-20[dfs] Fix path buffer leaks in utimensathanzhijian
2026-08-17Add AF_UNIX sockets implementation (#11681)Bernard Xiong
* components/dfs: support unix socket nodes AF_UNIX pathname binding and descriptor passing require DFSv2 socket nodes and retained open file descriptions across fd tables. Add socket-node creation for tmpfs and devtmpfs, fd reference helpers, and socket F_SETFL forwarding. Impact: DFSv2 socket nodes and descriptor reference handling. Validation: git diff --cached --check. * components/net/sal: support local protocol providers Local IPC protocol families do not have a backing network device. Store the selected provider in each SAL socket and add a local provider registry while preserving netdev checks for Internet sockets. Handle DFSv2 close semantics, socketpair flags, and MSG_CTRUNC for AF_UNIX integration. Impact: SAL protocol dispatch for all socket families. Validation: git diff --cached --check. * components/lwp: support unix socket messages Musl AF_UNIX addresses and ancillary data require explicit ABI and user-memory conversion at the LWP syscall boundary. Add the musl msghdr layout, bounded address and message copying, control-message level conversion, and MSG_CTRUNC translation. Correct receive buffer allocation and copy lengths while handling messages. Impact: LWP socket syscalls when SAL is enabled. Validation: git diff --cached --check. * components/net/af_unix: add local sockets Add an opt-in AF_UNIX provider for pathname-based local IPC without a synthetic network device. Support datagram and stream sockets, blocking and nonblocking I/O, timeouts, poll, socketpair, and SCM_RIGHTS descriptor passing. Include bounded Kconfig settings, component documentation, and utest coverage. Impact: enabled only by RT_USING_AF_UNIX and requires SAL POSIX with DFSv2. Validation: git diff --cached --check. * Fix AF_UNIX CI checks Apply the repository clang-format rules to the affected source lines. Suppress the cppcheck false positive for the devtmpfs list iterator. No functional behavior is changed. * components/lwp: preserve NULL optional msghdr buffers When msg_name or msg_control is NULL, keep the kernel pointer NULL instead of substituting an uninitialized buffer. Reject a NULL control buffer with a nonzero length as EFAULT. Impact: LWP sendmsg/recvmsg conversion on MMU targets. Validation: git diff --cached --check. * components/net/af_unix: fix poll UAF, namespace leak, and SCM_RIGHTS cycles Poll only the local wait queue and wake writers from the receiver. Free namespace entries on detach, and reject AF_UNIX descriptors in SCM_RIGHTS until cycle collection exists. Impact: AF_UNIX poll, bind lifetime, and descriptor passing. Validation: git diff --cached --check. * components/dfs: add DFSv2 AF_UNIX utest suite Add opt-in tests under dfs/utest/v2/af_unix for socket nodes, IPC, poll peer-close, namespace cleanup, and SCM_RIGHTS rejection. Sources are built only when RT_UTEST_TC_USING_DFS_V2_AF_UNIX and the selected test groups are enabled. Impact: DFS utest menu and build; no production AF_UNIX behavior change. Validation: git diff --cached --check.
2026-08-06[fix][dfs] ↵angryproton
增加文件系统操作的类型检查,防止类型不匹配导致数据结构不一致引发的异常
2026-07-31components/dfs: unify vnode lock namesBernard Xiong
2026-07-01fix dfs statfs fullpath leakOld-Ding
2026-01-06[FIX]Locking for dfs_dentry_dump must be consistent with that of all other ↵AngryProton
dentry functions.
2025-11-07fix:[dfs]ls在文件名太长时打印出来的文件名与大小连接在� ↵wdfk-prog
�起,无法区分
2025-08-04[components/dfs]add doxygen comments for dfs sequence file in dfs_v2.ligr
2025-08-04[components/dfs]add doxygen comments for dfs_file.c in dfs_v2.ligr
2025-08-04[components/dfs]add doxygen comments for dfs_file_mmap.c in dfs_v2.ligr
2025-08-04[components/dfs]add and optimize doxygen comments for dfs.c in dfs_v2.ligr
2025-08-04[components/dfs]add doxygen comments for dfs_fs.c in dfs_v2. #10538Guorui Li
2025-08-03[components/dfs]add doxygen comments for dfs pcache file in dfs_v2.ligr
2025-07-31[bugfix][component/dfs] fix bugs for function _get_parent_path(). (#10539)Guorui Li
* [bugfix][component/dfs]1.Skip the trailing slash character failed. 2. Scenario that parent path is root is not considered. * replace strdup() by rt_strdup(). * free memory after strdup(). * fix issue of not appending '\0' at end when parent path is root.
2025-07-30[components/dfs]add doxygen comments for dfs_dentry.c in dfs_v2. (#10561)Guorui Li
2025-07-30[components/dfs]add doxygen comments for dfs_vnode.c in dfs_v2. (#10563)Guorui Li
2025-07-30[components/dfs]add doxygen comments for dfs_mnt.c in dfs_v2.ligr
2025-07-22doxygen: group name all in lowcase (part 2) (#10530)Chen Wang
* doxygen: fs: unify groupname to lowercase Signed-off-by: Chen Wang <[email protected]> * doxygen: drivers: unify groupname to lowercase Signed-off-by: Chen Wang <[email protected]> * doxygen: signal: unify groupname to lowercase Signed-off-by: Chen Wang <[email protected]> --------- Signed-off-by: Chen Wang <[email protected]>
2025-06-25doxygen: group name all in lowcaseChen Wang
This patch only updated the groups defined in documentation/0.doxygen. Other groups will be moved into documentation/0.doxygen and updated at that time. Signed-off-by: Chen Wang <[email protected]>
2025-03-12修复 MMCSD 宏拼写错误+内核开启LOG_D编译问题yixinghua121
2025-02-25feat: mm: added affinity pages allocatorShell
This patch introduces a tagged pages allocator to address the existing problems of page aliasing on specific platforms and the requirement of page coloring. It implements an affinity-id aware page manager by separating the runtime page list into two types: a normal single linked-list and a multi-dimensional affinity-list. Changes: - Introduced tagged pages allocator and managing algorithm for affinity pages list - Modified components to support affinity-id list management - Updated page allocation and freeing functions to handle tagged pages - Added configuration options for page affinity block size and debugging - Modified mmap and elf loading to respect affinity settings - Enhanced page list management to support multi-dimensional affinity-list Signed-off-by: Shell <[email protected]>
2025-02-15doxygen: add prefix for groups (#9991)Chen Wang
* doxygen: add prefix for groups Add "group_" prefix to doxygen group names. This makes it easier to grep with group name later. This patch only modifies the groups defined in the pathes of INPUT of documentation/Doxyfile: INPUT = . \ ../src \ ../include \ ../components/finsh \ ../components/drivers/include/drivers \ ../components/drivers/clk \ ../components/dfs/dfs_v2/src \ ../components/dfs/dfs_v2/include Other groups are not touched. Signed-off-by: Chen Wang <[email protected]> * ci: fixed error report when run file_check.py Such as: - "please delete extra space at the end of this line." - "the RT-Thread error code should return negative value. e.g. return -RT_ERROR" Signed-off-by: Chen Wang <[email protected]> --------- Signed-off-by: Chen Wang <[email protected]>
2025-02-09[dfs]mmap的文件在关闭后释放file指针 (#9917)heyuanjie87
* [dfs]mmap的文件在关闭后释放file指针
2025-01-06fixup: umount: set errno according to POSIXShell
According to the POSIX.1, we should give a EBUSY on umount(2) of busy filesystem. Signed-off-by: Shell <[email protected]>
2025-01-06feat: add support for dfs remount functionalityShell
This patch introduces a remount feature for the DFS, allowing for the modification of mount parameters without unmounting the filesystem, the remount functionality helps modify certain mount flags (like `MS_RDONLY`) without requiring an unmount, providing more control over mounted filesystems in the system. The updates is essential for user space init proc to cleanup the runtime resource, ensuring clean handling of cached data and enhancing system robustness during power down processing. Changes: - Defined new constants for remount flags in `dfs_fs.h`. - Added the `dfs_remount()` function in `dfs_fs.c` to handle remount operations. - Introduced a check for unsupported flags and handle error conditions such as invalid paths or non-directory targets. - Updated the `dfs_mnt` structure in `dfs_mnt.h` to include a read-only flag (`MNT_RDONLY`). - The `dfs_remount()` function allows changing the read-only status of a mounted filesystem. - Added `MNT_LAZY_UMNT` and `MNT_RDONLY` flags to `dfs_mnt` structure. - Introduced `dfs_mnt_setflags` function for dynamic flag management. - Updated `dfs_remount` to utilize `dfs_mnt_setflags` for flag setting. - Enhanced unmount operations with `dfs_mnt_umount_iter` and lazy unmounting. - Added `dfs_pcache_clean` to handle cache cleanup for read-only mounts. - Improved error reporting in `dfs_umount` for better user feedback. - Refactored `sys_mount` to streamline parameter handling and support remounts. - Introduced `_cp_from_usr_string` helper for user-space string operations. - Updated internal APIs to ensure consistency in reference count management. Signed-off-by: Shell <[email protected]>
2025-01-06feat: add system reboot and process teardown supportShell
The patch introduces support for system reboot functionality and process teardown, allowing for a clean shutdown and unmounting of the root filesystem. This is necessary for ensuring a proper system shutdown process, especially when dealing with resource cleanup and ensuring that all processes have exited before system shutdown. Changes: - Added `lwp_teardown()` function to handle process cleanup and system teardown. - Introduced `lwp_pid_wait_for_empty()` to wait for process ID table emptiness before proceeding with shutdown. - Updated `dfs_mnt_unref()` to trigger callbacks when unmounting a filesystem. - Added new reboot types (`RB_AUTOBOOT`, `RB_POWER_OFF`) and implemented their corresponding actions, including cleanup of processes and unmounting root filesystem. - Extended `sys_reboot()` to handle reboot and power off types with appropriate callbacks for process and filesystem teardown. - Introduced callback mechanism for root filesystem unmount notifications. Signed-off-by: Shell <[email protected]>
2025-01-01修复编译过程中的 DFS_V2报错、FAL警告yuqingli05
2024-12-09doc(doxyge):fix doxygen pathSupper Thomas
2024-11-30[documentation][dfs]add some comments to dfs posix APIs for supplement.ligr
2024-09-14fixup: dfsv2: seq: aligned proto of lseek to manualShell
In manual, the prototype of lseek is `off_t lseek(int fd, off_t offset, int whence);` where the return type is `off_t` but not ssize_t. Signed-off-by: Shell <[email protected]>
2024-08-25【修复】修复link系统调用返回值问题zhuzhuzhu
2024-08-25【修复】修复rmdir系统调用返回值不符合用户预期问题zhuzhuzhu
2024-08-25【修复】 修复dup系统调用对用户态的返回值问题zhuzhuzhu
2024-08-25【修复】修复symlink系统调用返回值不是预期问题zhuzhuzhu
2024-08-24fix_returnzhujiale
2024-07-18fix exec and mount error codezhao maosheng
2024-07-16[dfs] Mark dirty on unmap on shared mapping only (#9195)Shell
[dfs] feat: Mark dirty on unmap for shared mapping This patch optimizes the pcache varea management by refining the conditions under which pages are marked dirty, specifically targeting the unmap operations in the dfs_pcache component. These changes were necessary to enhance the efficiency of page cache management. Changes: - Adjusted include statements in `dfs_pcache.c` for better organization. - Modified `dfs_aspace_unmap` function: - Added a check to ensure `varea` is not privately locked before marking a page as dirty. - Updated `dfs_aspace_page_unmap` function: - Added a similar check for `varea` lock status before marking a page as dirty. Signed-off-by: Shell <[email protected]>
2024-04-28fix file mmap (#8865)xiao-mang
2024-04-19fix for art-pi smartxiao-mang
2024-04-19fix for art-pi smartxiao-mang
2024-04-19fix chdir for ash's cd (#8824)xiao-mang
2024-04-10fix symlink (#8755)geniusgogo
Signed-off-by: geniusgogo <[email protected]>
2024-04-09[dfsv2] add dfs pwrite preadgeniusgogo
2024-03-28sync smart & dfs (#8672)Shell
Signed-off-by: xqyjlj <[email protected]> Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2024-03-15[dfs] fixup bugs in dfs_dentry_lookup (#8612)Shell
Signed-off-by: Shell <[email protected]>
2024-02-23🎯 Sync smart & scheduler codes (#8537)Shell
Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2023-12-16dfsv2 code tidy. (#8374)geniusgogo