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 | zig |
|||||||
| 23 | } |
|||||||
|
24 | class fs_data <<union>> { |
||||||
| 25 | ext2_fs_t e2fs; |
|||||||
|
26 | } |
||||||
|
27 | |||||||
|
28 | block_device_t <|-- vmp_t |
||||||
|
29 | vfs_fs_t <|-- vmp_t |
||||||
|
30 | |||||||
| 31 | note for fs_fata "this is a union" |
|||||||
|
32 | ``` |
||||||
|
33 | > [!NOTE] |
||||||
| 34 | > This diagram is evolving as I am in the process of implementing |
|||||||
| 35 | > the code for this. Anything could change, so come back often. |
|||||||