fs: add hostfs/rpmsgfs link/symlink/readlink/lstat backends - #19990
Merged
Conversation
Kaben123
requested review from
Donny9,
GUIDINGLI,
Ouss4,
jerpelea,
masayuki2009,
pkarashchenko,
xiaoxiang781216 and
yamt
as code owners
August 28, 2026 06:10
Replace the global `g_lock` with a per-filesystem `fs->fs_lock` to improve concurrency for multi-mount scenarios. Signed-off-by: buxiasen <buxiasen@xiaomi.com>
Migrate hostfs path buffer allocation from fs_heap and stack arrays to lib_get_tempbuffer/lib_put_tempbuffer. Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
Implemented link(), symlink(), readlink() and lstat() in hostfs. Signed-off-by: zhengyu16 <zhengyu16@xiaomi.com>
Implement link(), symlink(), readlink() and lstat() in rpmsgfs. Signed-off-by: zhengyu16 <zhengyu16@xiaomi.com>
Add missing blank lines after declarations and fix one bad alignment in hostfs/rpmsgfs-related files. These are pre-existing style issues flagged by CI's whole-file nxstyle check when our PR touches these files. No logic change (git diff -w is blank-line-only additions). Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
Kaben123
force-pushed
the
pse52-03-fs-backends
branch
from
August 28, 2026 06:15
318ed14 to
595b1f1
Compare
|
xiaoxiang781216
approved these changes
Aug 28, 2026
GUIDINGLI
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement link, symlink, readlink, and lstat support for the hostfs and rpmsgfs filesystem backends, utilizing the mountpt_operations interfaces added in #19949.
This is PR#3 of a 4-part PSE52/POSIX filesystem enhancement series:
Changes (4 commits)
fs/hostfs: move global lock into hostfs_mountpt_s — Replace the global
g_lockwith a per-filesystemfs->fs_lock, improving concurrency for multi-mount scenarios.fs/hostfs: change fs_heap to lib_tempbuffer — Migrate hostfs path buffer allocation from fs_heap/stack arrays to the
lib_get_tempbuffer/lib_put_tempbuffersystem, aligning with the inode layer (merged in fs/inode: add POSIX path-resolution infrastructure #19950).fs/hostfs: add link, symlink, readlink and lstat support — Implement the four operations for hostfs, including arch host stubs for sim/arm/arm64/risc-v/xtensa. Adds the necessary
nuttx_host_link,nuttx_host_symlink,nuttx_host_readlink, andnuttx_host_lstathost-side functions.fs/rpmsgfs: add link, symlink, readlink and lstat support — Implement the four operations for rpmsgfs, adding the corresponding client RPC handlers and server-side dispatch.
Testing
sim:nshwithCONFIG_FS_HOSTFS=y+CONFIG_FS_LINKS=y: builds cleanly, zero errors, zero warnings.Impact