DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Boards With Significant Improvements
File System
Bug Fixes
...
 Improvements
| Markdown |
|---|
* [#16722](https://github.com/apache/nuttx/pull/16722) fs/block_proxy: fix the issue of the refs count for filep being zeroed out by utilizing dup2
* [#16938](https://github.com/apache/nuttx/pull/16938) fs/fat: Fix wrong alloc used in fat_zero_cluster()
* [#16536](https://github.com/apache/nuttx/pull/16536) fs/fcntl: using ioctl to implement FIOGCLEX/FIOCLEX/FIONCLEX
* [#16832](https://github.com/apache/nuttx/pull/16832) fs/lock: Allow driver lock
* [#16598](https://github.com/apache/nuttx/pull/16598) fs/procfs: fix output format of fd info
* [#16518](https://github.com/apache/nuttx/pull/16518) fs/smartfs: Fix a fatal bug about sector writing after seek
* [#16590](https://github.com/apache/nuttx/pull/16590) fs/smartfs: Fix a fatal bug about sector writing after seek
* [#16490](https://github.com/apache/nuttx/pull/16490) fs/vfs: check if all `iov_base` are accessible
* [#16584](https://github.com/apache/nuttx/pull/16584) fs/vfs: check if all iov_base are accessible
* [#16609](https://github.com/apache/nuttx/pull/16609) fs/vfs: clear filep when call file_open/file_mq_open to avoid random value[bug fix]
* [#16538](https://github.com/apache/nuttx/pull/16538) fs/vfs/fs_close.c: avoid double free if CONFIG_FS_NOTIFY is set
* [#16455](https://github.com/apache/nuttx/pull/16455) fs/vfs/fs_rename: fix directory move operation. |
Networking
Improvements
Bug Fixes
Compatibility Concerns
| Markdown |
|---|
* [#16499](https://github.com/apache/nuttx/pull/16499) [BREAKING] fs/vfs: Separate file descriptors from file descriptions This PR is a rework of the NuttX file descriptor implementation. The goal is two-fold: Improve POSIX compliance. The old implementation tied file description to inode only, not the file struct. POSIX however dictates otherwise. Fix a bug with descriptor duplication (dup2() and dup3()). There is an existing race condition with this POSIX API that currently results in a kernel side crash. The crash occurs when a partially open / closed file descriptor is duplicated. The reason for the crash is that even if the descriptor is closed, the file might still be in use by the kernel (due to e.g. ongoing write to file). The open file data is changed by file_dup3() and this causes a crash in the device / drivers themselves as they lose access to the inode and private data. The fix is done by separating struct file into file and file descriptor structs. The file struct can live on even if the descriptor is closed, fixing the crash. This also fixes the POSIX issue, as two descriptors can now point to the same file. The implementation of this PR is based on the modifications made in #16361. Thank you @pussuw DEPENDS ON: apache/nuttx-apps#3091 IMPACT Remove the FS_REFCOUNT config because reference counting is a very necessary feature that is required in many scenarios to ensure stability. Rename the functions fs_getfilep, fs_putfilep, and fs_reffilep to file_get, file_put, and file_ref respectively, to unify the naming convention to file_xxx, such as file_open, file_ioctl, etc. Introduce a new fd (file descriptor) structure. If multiple file descriptors (fds) are in a dup relationship, they can share the same file entity to implement the dup functionality. Modify the functions nx_close_from_tcb, nx_open_from_tcb, nx_dup2_from_tcb, and nx_dup3_from_tcb to fdlist_open, fdlist_close, fdlist_dup2, and fdlist_dup3 respectively, to uniformly operate on file descriptors using fdlist. |
...