1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00
serenity/Kernel/FileSystem
Liav A 12b6e69150 Kernel: Introduce the new ProcFS design
The new ProcFS design consists of two main parts:
1. The representative ProcFS class, which is derived from the FS class.
The ProcFS and its inodes are much more lean - merely 3 classes to
represent the common type of inodes - regular files, symbolic links and
directories. They're backed by a ProcFSExposedComponent object, which
is responsible for the functional operation behind the scenes.
2. The backend of the ProcFS - the ProcFSComponentsRegistrar class
and all derived classes from the ProcFSExposedComponent class. These
together form the entire backend and handle all the functions you can
expect from the ProcFS.

The ProcFSExposedComponent derived classes split to 3 types in the
manner of lifetime in the kernel:
1. Persistent objects - this category includes all basic objects, like
the root folder, /proc/bus folder, main blob files in the root folders,
etc. These objects are persistent and cannot die ever.
2. Semi-persistent objects - this category includes all PID folders,
and subdirectories to the PID folders. It also includes exposed objects
like the unveil JSON'ed blob. These object are persistent as long as the
the responsible process they represent is still alive.
3. Dynamic objects - this category includes files in the subdirectories
of a PID folder, like /proc/PID/fd/* or /proc/PID/stacks/*. Essentially,
these objects are always created dynamically and when no longer in need
after being used, they're deallocated.
Nevertheless, the new allocated backend objects and inodes try to use
the same InodeIndex if possible - this might change only when a thread
dies and a new thread is born with a new thread stack, or when a file
descriptor is closed and a new one within the same file descriptor
number is opened. This is needed to actually be able to do something
useful with these objects.

The new design assures that many ProcFS instances can be used at once,
with one backend for usage for all instances.
2021-06-29 20:53:59 +02:00
..
AnonymousFile.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
AnonymousFile.h Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
BlockBasedFileSystem.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
BlockBasedFileSystem.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Custody.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
Custody.h Kernel: Rename Custody::create() => try_create() 2021-05-28 11:23:00 +02:00
DevFS.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
DevFS.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
DevPtsFS.cpp Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
DevPtsFS.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
ext2_fs.h Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
ext2_types.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Ext2FileSystem.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
Ext2FileSystem.h Kernel: Ensure Ext2FSInode's lookup is populated before using it 2021-06-22 11:01:59 +02:00
FIFO.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
FIFO.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
File.cpp Kernel: Closing a file descriptor should not always close the file 2021-04-30 11:42:35 +02:00
File.h Kernel: Implement multi-watch InodeWatcher :^) 2021-05-12 22:38:20 +02:00
FileBackedFileSystem.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
FileBackedFileSystem.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
FileDescription.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
FileDescription.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
FileSystem.cpp Kernel: Pull apart CPU.h 2021-06-24 00:38:23 +02:00
FileSystem.h Kernel: static vs non-static constexpr variables 2021-05-19 21:21:47 +01:00
Inode.cpp Kernel: Update check in Inode::read_entire 2021-06-17 19:52:54 +02:00
Inode.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
InodeFile.cpp Kernel: Change Inode::{read/write}_bytes interface to KResultOr<ssize_t> 2021-05-02 13:27:37 +02:00
InodeFile.h Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
InodeIdentifier.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
InodeMetadata.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
InodeWatcher.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
InodeWatcher.h Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
Plan9FileSystem.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
Plan9FileSystem.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
ProcFS.cpp Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
ProcFS.h Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
SysFS.cpp Kernel/SysFS: Add PCI exposed folder 2021-06-29 20:53:59 +02:00
SysFS.h Kernel: Introduce the new SysFS 2021-06-29 20:53:59 +02:00
TmpFS.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
TmpFS.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
VirtualFileSystem.cpp Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
VirtualFileSystem.h Kernel: Don't assume there are no nodes if m_unveiled_paths.is_empty() 2021-06-08 12:15:04 +02:00