Blame
|
1 | # Filesystem Layer |
||||||
| 2 | ||||||||
| 3 | ```mermaid |
|||||||
|
4 | --- |
||||||
|
5 | title: Filesystem Structures |
||||||
|
6 | --- |
||||||
| 7 | classDiagram |
|||||||
|
8 | class vmp_t{ |
||||||
|
9 | block_device-t *dev_driver; |
||||||
| 10 | vfs_fs_t *fs_driver; |
|||||||
| 11 | char name[16]; |
|||||||
|
12 | uint8_t block_buff[BLOCK_DEVICE_BLOCK_SIZE]; |
||||||
| 13 | unsigned int mounted : 1; |
|||||||
| 14 | unsigned int read_only : 1; |
|||||||
| 15 | uint8_t subdev; |
|||||||
|
16 | union fs_data; |
||||||
|
17 | } |
||||||
| 18 | class block_device_t { |
|||||||
| 19 | zob |
|||||||
|
20 | } |
||||||
|
21 | class vfs_fs_t { |
||||||
|
22 | uint8_t type; |
||||||
| 23 | int (*handles_path)(const char *pathname); |
|||||||
| 24 | char *name; |
|||||||
| 25 | block_device_t *dev; |
|||||||
| 26 | vfs_t api; |
|||||||
|
27 | } |
||||||
|
28 | class fs_data <<union>> { |
||||||
| 29 | ext2_fs_t e2fs; |
|||||||
|
30 | } |
||||||
|
31 | |||||||
|
32 | block_device_t <|-- vmp_t |
||||||
|
33 | vfs_fs_t <|-- vmp_t |
||||||
|
34 | |||||||
|
35 | ``` |
||||||
|
36 | > [!NOTE] |
||||||
| 37 | > This diagram is evolving as I am in the process of implementing |
|||||||
| 38 | > the code for this. Anything could change, so come back often. |
|||||||