mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 0/6] fs: implement tree and truncate
Date: Thu, 20 Mar 2025 06:20:13 +0100	[thread overview]
Message-ID: <20250320052019.1726331-1-a.fatoum@pengutronix.de> (raw)

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




             reply	other threads:[~2025-03-20  5:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20  5:20 Ahmad Fatoum [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250320052019.1726331-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox