[PATCH 0/6] fs: implement tree and truncate
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Mar 19 22:20:13 PDT 2025
Turn opendir inside out, so it uses directory fds internally.
This is an important change, because it means that the inode
iterate operation will now operate on a real struct file.
This is a prerequisite for porting 9pfs from Linux as it expects
directories to be openend before iteration.
To aid with future development of file systems, introduce a tree and
a truncate command on top.
Ahmad Fatoum (6):
fs: use filename_create/filename_lookup instead of open-coding
fs: implement O_DIRECTORY
fs: implement opendir in terms of fdopendir
commands: implement tree command
commands: add new truncate command
Documentation: devel: add short section on file systems
Documentation/devel/background-execution.rst | 2 +
Documentation/devel/devel.rst | 1 +
Documentation/devel/filesystems.rst | 73 +++++++
commands/Kconfig | 24 +++
commands/Makefile | 2 +
commands/stat.c | 2 +-
commands/tree.c | 159 ++++++++++++++
commands/truncate.c | 100 +++++++++
fs/fs.c | 207 +++++++------------
include/dirent.h | 3 +-
test/self/dirfd.c | 11 +-
11 files changed, 438 insertions(+), 146 deletions(-)
create mode 100644 Documentation/devel/filesystems.rst
create mode 100644 commands/tree.c
create mode 100644 commands/truncate.c
--
2.39.5
More information about the barebox
mailing list