1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

Kernel+SystemServer+Base: Introduce the RAMFS filesystem

This filesystem is based on the code of the long-lived TmpFS. It differs
from that filesystem in one keypoint - its root inode doesn't have a
sticky bit on it.

Therefore, we mount it on /dev, to ensure only root can modify files on
that directory. In addition to that, /tmp is mounted directly in the
SystemServer main (start) code, so it's no longer specified in the fstab
file. We ensure that /tmp has a sticky bit and has the value 0777 for
root directory permissions, which is certainly a special case when using
RAM-backed (and in general other) filesystems.

Because of these 2 changes, it's no longer needed to maintain the TmpFS
filesystem, hence it's removed (renamed to RAMFS), because the RAMFS
represents the purpose of this filesystem in a much better way - it
relies on being backed by RAM "storage", and therefore it's easy to
conclude it's temporary and volatile, so its content is gone on either
system shutdown or unmounting of the filesystem.
This commit is contained in:
Liav A 2023-01-28 19:00:54 +02:00 committed by Andrew Kaster
parent fa637e29d2
commit ed67a877a3
12 changed files with 123 additions and 118 deletions

View file

@ -49,6 +49,7 @@ class ProcFSSystemBoolean;
class ProcFSSystemDirectory;
class Process;
class ProcessGroup;
class RAMFS;
template<LockRank Rank>
class RecursiveSpinlock;
class Scheduler;
@ -64,7 +65,7 @@ class TCPSocket;
class TTY;
class Thread;
class ThreadTracer;
class TmpFSInode;
class RAMFSInode;
class UDPSocket;
class UserOrKernelBuffer;
class VirtualFileSystem;