mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 00/13] fs: Use device special nodes for devfs
@ 2025-12-09 12:51 Sascha Hauer
  2025-12-09 12:51 ` [PATCH v2 01/13] fs: devfs-core: add devfs_create_link_node() Sascha Hauer
                   ` (13 more replies)
  0 siblings, 14 replies; 29+ messages in thread
From: Sascha Hauer @ 2025-12-09 12:51 UTC (permalink / raw)
  To: BAREBOX

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>
---
Changes in v2:
- Fix storage-by-uuid driver for devfs changes
- remove created device special files and links on devfs_remove()
- Link to v1: https://lore.barebox.org/20251127-devfs-v1-0-4aff12818757@pengutronix.de

---
Sascha Hauer (13):
      fs: devfs-core: add devfs_create_link_node()
      storage-by-alias: drop fake cdev
      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
      common: cdev-alias: rename struct
      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/cdev-alias.c             |  12 +--
 common/partitions.c             |   2 +-
 common/startup.c                |   2 +-
 drivers/block/dm/dm-core.c      |   1 -
 drivers/misc/storage-by-alias.c | 120 ++--------------------
 fs/devfs-core.c                 | 214 +++++++++++++++++++++++++---------------
 fs/devfs.c                      | 180 +++------------------------------
 fs/fs.c                         |  75 +++++++++-----
 fs/ramfs.c                      |  18 ++++
 include/block.h                 |   2 -
 include/driver.h                |  20 +++-
 include/fcntl.h                 |   6 ++
 include/linux/fs.h              |  13 +++
 include/linux/stat.h            |   1 +
 19 files changed, 327 insertions(+), 402 deletions(-)
---
base-commit: 500df27eb054f86ce232c5bb30c3a7ea8f771e61
change-id: 20251127-devfs-c138cff5482a

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




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

end of thread, other threads:[~2025-12-15 12:17 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-09 12:51 [PATCH v2 00/13] fs: Use device special nodes for devfs Sascha Hauer
2025-12-09 12:51 ` [PATCH v2 01/13] fs: devfs-core: add devfs_create_link_node() Sascha Hauer
2025-12-15 11:14   ` Ahmad Fatoum
2025-12-09 12:51 ` [PATCH v2 02/13] storage-by-alias: drop fake cdev Sascha Hauer
2025-12-15 11:15   ` Ahmad Fatoum
2025-12-09 12:51 ` [PATCH v2 03/13] fs: implement mknod Sascha Hauer
2025-12-15 11:19   ` Ahmad Fatoum
2025-12-09 12:51 ` [PATCH v2 04/13] commands: add mknod command Sascha Hauer
2025-12-15 11:21   ` Ahmad Fatoum
2025-12-09 12:51 ` [PATCH v2 05/13] fs: ramfs: add device file support Sascha Hauer
2025-12-15 11:22   ` Ahmad Fatoum
2025-12-09 12:51 ` [PATCH v2 06/13] cdev: add cdev_size() helper Sascha Hauer
2025-12-15 11:22   ` Ahmad Fatoum
2025-12-09 12:51 ` [PATCH v2 07/13] fs: fix st_size for device files Sascha Hauer
2025-12-15 11:24   ` Ahmad Fatoum
2025-12-09 12:51 ` [PATCH v2 08/13] fs: retire devfs as filesystem Sascha Hauer
2025-12-15 11:25   ` Ahmad Fatoum
2025-12-09 12:51 ` [PATCH v2 09/13] fs: include cdevname in struct stat Sascha Hauer
2025-12-15 11:25   ` Ahmad Fatoum
2025-12-09 12:51 ` [PATCH v2 10/13] fs: stat_print: get cdevname from stat Sascha Hauer
2025-12-15 11:26   ` Ahmad Fatoum
2025-12-09 12:51 ` [PATCH v2 11/13] common: cdev-alias: rename struct Sascha Hauer
2025-12-15 11:27   ` Ahmad Fatoum
2025-12-09 12:51 ` [PATCH v2 12/13] fs: replace cdev links with aliases Sascha Hauer
2025-12-15 11:31   ` Ahmad Fatoum
2025-12-15 12:17     ` Sascha Hauer
2025-12-09 12:51 ` [PATCH v2 13/13] ls: use ~0 for FILE_SIZE_STREAM Sascha Hauer
2025-12-15 11:32   ` Ahmad Fatoum
2025-12-15 12:16 ` [PATCH v2 00/13] fs: Use device special nodes for devfs Sascha Hauer

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