Commit Graph

656 Commits

Author SHA1 Message Date
wdfk-prog
bd22f2fa6a fix(dfs): align fd API declarations with DFS_USING_POSIX 2026-01-06 16:44:35 +08:00
AngryProton
7384a8e035 [FIX]Locking for dfs_dentry_dump must be consistent with that of all other dentry functions. 2026-01-06 12:03:41 +08:00
angryproton
df85c74265 [FIX][DFSv2][ELMFAT]解决dfs_elm_unlink在FF_VOLUMES为1时赋值drivers_fn引用未定义变量导致编译报错的问题 2025-12-27 10:46:50 +08:00
angryproton
ec0c2bbbd8 [FIX][DFSv2][ELMFAT]修复多线程环境下lseek返回值概率性被篡改的问题 2025-12-26 21:03:26 +08:00
AngryProton
916b212855 [FIX]Update vnode size after writing to tmpfs 2025-12-26 15:10:48 +08:00
GuEe-GUI
2ffa4f3d60 [DFS] Support 9PFS
What is 9PFS (https://en.wikipedia.org/wiki/9P_(protocol)):
9P (or the Plan 9 Filesystem Protocol or Styx) is a network protocol developed for the Plan 9 from Bell Labs distributed operating system as the means of connecting the components of a Plan 9 system. Files are key objects in Plan 9. They represent windows, network connections, processes, and almost anything else available in the operating system.

rt-thread could share filesystem in VM mode with 9pfs such as QEMU...

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-04 15:48:28 +08:00
wdfk-prog
f56875fff5 fix[components]: 修复日志输出的gcc编译警告 2025-11-13 15:16:49 +08:00
wdfk-prog
95f7287313 fix:[dfs]ls在文件名太长时打印出来的文件名与大小连接在一起,无法区分 2025-11-07 16:59:23 +08:00
CYFS
6a9a1df437 [components]:utilize the clang-format-ignore mechanism (#10860) 2025-10-28 15:17:04 +08:00
Chen Wang
c1363c77d6 utest: Improve the strings displayed in the menu
Use "Test" instead of "Unit Testcases" to make string shorter.
Use uppercase to make it look more eye-catching.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-10-16 18:34:43 +08:00
Rbb666
79b14848bd [add][testcases]add filesystem(dfs api & posix api) testcase. 2025-09-07 07:52:08 +08:00
maosql
9567564e86 fix: warnings generated by Kconfig. 2025-09-01 11:50:41 +08:00
ligr
32e93ade4d [components/dfs]add doxygen comments for dfs sequence file in dfs_v2. 2025-08-04 09:55:01 +08:00
ligr
6015e149e7 [components/dfs]add doxygen comments for dfs_file.c in dfs_v2. 2025-08-04 09:49:45 +08:00
ligr
e143866eb8 [components/dfs]add doxygen comments for dfs_file_mmap.c in dfs_v2. 2025-08-04 09:48:12 +08:00
ligr
18c8c8b2f7 [components/dfs]add and optimize doxygen comments for dfs.c in dfs_v2. 2025-08-04 09:46:00 +08:00
Guorui Li
6a2dcd6a0b [components/dfs]add doxygen comments for dfs_fs.c in dfs_v2. #10538 2025-08-04 09:44:56 +08:00
ligr
8e18f354c5 [components/dfs]add doxygen comments for dfs pcache file in dfs_v2. 2025-08-03 10:53:26 +08:00
Guorui Li
d82dd71aef [bugfix][component/dfs] fix bugs for function _get_parent_path(). (#10539)
* [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-31 17:36:28 +08:00
Guorui Li
9f66b35874 [components/dfs]add doxygen comments for dfs_dentry.c in dfs_v2. (#10561) 2025-07-30 21:05:34 +08:00
Guorui Li
1662125a37 [components/dfs]add doxygen comments for dfs_vnode.c in dfs_v2. (#10563) 2025-07-30 21:03:42 +08:00
ligr
dc89417229 [components/dfs]add doxygen comments for dfs_mnt.c in dfs_v2. 2025-07-30 09:43:52 +08:00
Chen Wang
2aebe694d9 doxygen: group name all in lowcase (part 2) (#10530)
* doxygen: fs: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

* doxygen: drivers: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

* doxygen: signal: unify groupname to lowercase

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

---------

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-07-22 13:59:25 +08:00
Chen Wang
8e9872a554 doxygen: group name all in lowcase
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 <unicorn_wang@outlook.com>
2025-06-25 14:02:28 +08:00
Bernard Xiong
d1628a1cf3 [dfs] enable procfs and tempfs in default when using smart; fix LWIP_ROUTE warning issue. 2025-05-20 17:27:55 +08:00
yixinghua121
983f02151a 修复 MMCSD 宏拼写错误+内核开启LOG_D编译问题 2025-03-12 16:02:43 +08:00
lingfengPeng
29a06142c5 fix dangling pointer in component pthread and dfs_elm (#9976)
* [components/libc/posix][pthreads]fix the risk of dangling pointer

* [components][dfs][dfs_elm]:fix risk of dangling pointer, unmount the temp driver then free the temp FATFS in dfs_elm_mkfs.
2025-03-11 10:48:29 +08:00
wycwyhwyq
88195c8cab [components][dfs_v2]: Fix cromfs bug (#10054) 2025-03-02 16:01:11 +08:00
Shell
9386411d13 feat: mm: added affinity pages allocator
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 <smokewood@qq.com>
2025-02-25 11:26:30 +08:00
Chen Wang
c40b79037c doxygen: add prefix for groups (#9991)
* 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 <unicorn_wang@outlook.com>

* 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 <unicorn_wang@outlook.com>

---------

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-02-15 12:15:19 +08:00
GuEe-GUI
f20e8973be [DFS/ISO9660] Remove warning for ops
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
heyuanjie87
d3d33ff983 [dfs]mmap的文件在关闭后释放file指针 (#9917)
* [dfs]mmap的文件在关闭后释放file指针
2025-02-09 15:55:30 +08:00
zms123456
4343d32df4 [components][fs]sync procfs (#9206)
* add procfs

* fix ref count check error
2025-01-14 14:18:39 +08:00
zms123456
0ae537e531 [components][dfs]separate dfs fs data structure ops (#9205)
separate dfs fs data structure ops
2025-01-14 14:17:00 +08:00
wycwyhwyq
53bd56ccf9 [components][dfs_v2]: Fix dfs_devfs_open memory leak 2025-01-09 19:07:56 +08:00
Shell
6c6c5f5d35 feat: Kconfig: collecting some config to sub-menu
To improve the readability of the menuconfig.

Signed-off-by: Shell <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
Shell
8507c38222 fixup: umount: set errno according to POSIX
According to the POSIX.1, we should give a EBUSY on umount(2) of busy
filesystem.

Signed-off-by: Shell <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
Shell
b63b388d1f feat: add support for dfs remount functionality
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 <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
Shell
944f3d05b5 feat: add system reboot and process teardown support
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 <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
yuqingli
a343e1d7a0 [romfs/dfs_romfs.c] _rom_fops add ioctl 2025-01-03 00:39:54 -05:00
yuqingli05
d57b7cb40a 修复编译过程中的 DFS_V2报错、FAL警告 2025-01-01 19:02:50 -05:00
GuEe-GUI
07b114ae73 [DFS/FIXUP] Fixup ISO9660 build
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-18 21:37:51 +08:00
Supper Thomas
5b75e1c8bf doc(doxyge):fix doxygen path 2024-12-09 17:12:59 -05:00
ligr
1cf97d8565 [components][dfs]add some comments and fix some former comments error for dfs v1. 2024-12-03 19:10:21 -05:00
ligr
e9452ee98f [documentation][dfs]add some comments to dfs posix APIs for supplement. 2024-11-30 21:09:58 -05:00
GUI
42a41c696d [DM/FEATURE] Support SCSI bus (#9592)
* [DM/FEATURE] Support block for SCSI
1. Support SD and CD-ROM.
2. SD will port to UFS and ATA device.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-22 16:59:37 +08:00
Shell
e763e51e49 feat: devfs: handling unit size in POSIX RW request
POSIX.1 says:
>  read() attempts to read up to count bytes from file descriptor fd
>  into the buffer starting at buf.

On the other hand, for rt_device_read, the `@size` is defined as the
number of unit (block size for blk device, otherwise one byte).

Changes:
- Transferred unit size from POSIX R/W(in bytes) to rt_device_R/W during
  request of file R/W operations.

Signed-off-by: Shell <smokewood@qq.com>
2024-11-13 22:56:07 -05:00
kurisaw
2241f4676b [libcpu][component] fixed the r52 kernel gcc context switch assembly 2024-11-06 16:09:52 +08:00
yangpeng
c9a1245977 [components][dfs][dfs_v1]cat输出实际读取的长度 2024-10-10 17:44:32 -04:00
Shell
d45e13c471 fixup: dfs_v2: Correct device mode permissions in devfs
The mode permissions for character, block, and pipe devices were
previously set to 0777, which is overly permissive and not in line
with standard practice. This change reduces the permissions to 0666,
restricting execute permissions while still allowing read/write access.

Changes:
- Adjusted permissions for character/block/pipe devices from 0777 to 0666.

Signed-off-by: Shell <smokewood@qq.com>
2024-09-15 13:29:43 -04:00