mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH 00/10] fs: Use device special nodes for devfs
Date: Thu, 27 Nov 2025 10:19:22 +0100	[thread overview]
Message-ID: <20251127-devfs-v1-0-4aff12818757@pengutronix.de> (raw)

Until now we have a devfs which is a filesystem of its own. This
comes with a few limitations:

- we cannot create directories under /dev/
- Links are implemented in the devfs filesystem. They do not show
  up as regular links

This series overcomes these limitations by implementing device special
nodes. These nodes are limited to ramfs, so we cannot mount arbitrary
filesystems and use the device special files found on them. Nevertheless
we can create and use device special files on ramfs which is enough
to drop the devfs filesystem implementation and just use ramfs on /dev/.

This will in future allow us to create /dev/disk/by-* structures under
/dev/.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Sascha Hauer (10):
      fs: implement mknod
      commands: add mknod command
      fs: ramfs: add device file support
      cdev: add cdev_size() helper
      fs: fix st_size for device files
      fs: retire devfs as filesystem
      fs: include cdevname in struct stat
      fs: stat_print: get cdevname from stat
      fs: replace cdev links with aliases
      ls: use ~0 for FILE_SIZE_STREAM

 commands/Kconfig           |   4 +
 commands/Makefile          |   1 +
 commands/devinfo.c         |   7 +-
 commands/ls.c              |   8 +-
 commands/mknod.c           |  43 +++++++++++
 common/partitions.c        |   2 +-
 common/startup.c           |   2 +-
 drivers/block/dm/dm-core.c |   1 -
 fs/devfs-core.c            | 179 ++++++++++++++++++++++++--------------------
 fs/devfs.c                 | 180 +++------------------------------------------
 fs/fs.c                    |  75 +++++++++++++------
 fs/ramfs.c                 |  18 +++++
 include/block.h            |   2 -
 include/driver.h           |  10 +--
 include/fcntl.h            |   6 ++
 include/linux/fs.h         |  13 ++++
 include/linux/stat.h       |   1 +
 17 files changed, 266 insertions(+), 286 deletions(-)
---
base-commit: f018a6e4606ef31c6975af6b960aa7824f79df73
change-id: 20251127-devfs-c138cff5482a

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




             reply	other threads:[~2025-11-27  9:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27  9:19 Sascha Hauer [this message]
2025-11-27  9:19 ` [PATCH 01/10] fs: implement mknod Sascha Hauer
2025-11-27  9:19 ` [PATCH 02/10] commands: add mknod command Sascha Hauer
2025-11-27  9:19 ` [PATCH 03/10] fs: ramfs: add device file support Sascha Hauer
2025-11-27  9:19 ` [PATCH 04/10] cdev: add cdev_size() helper Sascha Hauer
2025-11-27  9:19 ` [PATCH 05/10] fs: fix st_size for device files Sascha Hauer
2025-11-27  9:19 ` [PATCH 06/10] fs: retire devfs as filesystem Sascha Hauer
2025-11-27  9:19 ` [PATCH 07/10] fs: include cdevname in struct stat Sascha Hauer
2025-11-27  9:19 ` [PATCH 08/10] fs: stat_print: get cdevname from stat Sascha Hauer
2025-11-27  9:19 ` [PATCH 09/10] fs: replace cdev links with aliases Sascha Hauer
2025-11-27  9:19 ` [PATCH 10/10] ls: use ~0 for FILE_SIZE_STREAM Sascha Hauer

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=20251127-devfs-v1-0-4aff12818757@pengutronix.de \
    --to=s.hauer@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