... | ... | @@ -23,4 +23,47 @@ |
|
|
|
|
|
综上所述,我们计划修改上面提到的总共 `9` 个系统调用来使MaQueOS支持FAT32。
|
|
|
|
|
|
# Linux 对 FAT32 支持的实现 |
|
|
# Linux 对文件系统的支持的实现
|
|
|
|
|
|
```
|
|
|
+--------------------+
|
|
|
| User Space |
|
|
|
|--------------------|
|
|
|
| mount("/dev/sdb1",|
|
|
|
| "/mnt/myusb", |
|
|
|
| "vfat", ...) |
|
|
|
+---------+----------+
|
|
|
|
|
|
|
v
|
|
|
+--------------------+
|
|
|
| Kernel Space |
|
|
|
|--------------------|
|
|
|
| sys_mount() | <---- System Call Interface
|
|
|
| | |
|
|
|
| v |
|
|
|
| Verify Params |
|
|
|
| | |
|
|
|
| v |
|
|
|
| Find FS Driver |
|
|
|
| | |
|
|
|
| v |
|
|
|
| Call vfat_fill_ |
|
|
|
| super() | <---- File System Driver
|
|
|
+---------+----------+
|
|
|
|
|
|
|
v
|
|
|
+--------------------+
|
|
|
| vfat_fill_super() |
|
|
|
|--------------------|
|
|
|
| Init Superblock |
|
|
|
| Read FS Structure |
|
|
|
| Set FS Operations |
|
|
|
+---------+----------+
|
|
|
|
|
|
|
v
|
|
|
+--------------------+
|
|
|
| VFS Integration |
|
|
|
| (Update Mount |
|
|
|
| Table, etc.) |
|
|
|
+--------------------+
|
|
|
``` |
|
|
\ No newline at end of file |