Skip to content

Refactor filesystem and block device system #122

@arthurp

Description

@arthurp

Currently, the filesystem stack as the following basic design. This is ignoring various details.

+--------------------+
| Posix Layer        |
+--------------------+
         |
         |
         v
+-------------------------------+                   +---------------------+
| File-backed Virtual Memory    |--- trait Pager -->| Page Cache Manager  |
+-------------------------------+                   +---------------------+
         |                                           |
         | (direct struct access)                    |
         v                                           |
+--------------------+                               |
| Page Cache         |<------------------------------+
+--------------------+
         |
         | trait PageStore
         v
+--------------------+
| File/"Inode"       |
+--------------------+
         |
         | (internal to specific filesystem)
         v
+--------------------+
| Filesystem         |
+--------------------+
         |
         | trait BlockDevice
         v
+--------------------+
| Block Device       |
+--------------------+

(Thanks ChatGPT for the cleaned up ASCII art.)

This should be changes to:

  • Identical (or at least similar) interfaces between layers
  • The cache as a separate server without multiple communication paths to other parts of the system.
  • The cache can (and by default is) placed below the file system.
  • The files are internal to the Filesystem server and only file handles are passed around outside that. The handle will be passed to the server to perform reads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions