mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/6] fs: implement tree and truncate
@ 2025-03-20  5:20 Ahmad Fatoum
  2025-03-20  5:20 ` [PATCH 1/6] fs: use filename_create/filename_lookup instead of open-coding Ahmad Fatoum
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2025-03-20  5:20 UTC (permalink / raw)
  To: barebox

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-03-20  5:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-20  5:20 [PATCH 0/6] fs: implement tree and truncate Ahmad Fatoum
2025-03-20  5:20 ` [PATCH 1/6] fs: use filename_create/filename_lookup instead of open-coding Ahmad Fatoum
2025-03-20  5:20 ` [PATCH 2/6] fs: implement O_DIRECTORY Ahmad Fatoum
2025-03-20  5:20 ` [PATCH 3/6] fs: implement opendir in terms of fdopendir Ahmad Fatoum
2025-03-20  5:20 ` [PATCH 4/6] commands: implement tree command Ahmad Fatoum
2025-03-20  5:20 ` [PATCH 5/6] commands: add new truncate command Ahmad Fatoum
2025-03-20  5:20 ` [PATCH 6/6] Documentation: devel: add short section on file systems Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox