|
|
本帖最后由 不点 于 2019-3-31 11:51 编辑
今天去了 redox 主页,发现它有自己的文件系统,叫做 RedoxFS。不知您能否再提供点信息?您能否谈谈 redox os 的使用经验?
在 https://github.com/redox-os/redoxfs 看到了一句话:
The Redox Filesystem. Compatible with Redox and Linux.
就这么一句简单的说明。
在 https://github.com/redox-os/redoxfs/blob/master/DESIGN.md 看到了文件系统的设计:
RedoxFS Design Document
Structures
Header
The header is the entry point for the filesystem. When mounting a disk or image, it should be scanned for a block starting with the 8-byte signature, within the first megabyte:
"RedoxFS\0"
The header stores the filesystem version, disk identifier, disk size, root block pointer, and free block pointer.
- #[repr(packed)]
- pub struct Header {
- pub signature: [u8; 8],
- pub version: u64,
- pub uuid: [u8; 16],
- pub size: u64,
- pub root: u64,
- pub free: u64,
- }
复制代码
The root and free block pointers point to a Node that identifies Node
- #[repr(packed)]
- pub struct Node {
- pub name: [u8; 256],
- pub mode: u64,
- pub next: u64,
- pub extents: [Extent; 15],
- }
复制代码
看这代码,似乎用固定长度的文件名(固定占据 256 字节)。mode 居然用 64 位(猜测它可能是把所有的字段都弄成 64 位的,即,8 字节对齐)。没见到 inode 号码,因此,有可能也不支持硬链接。
|
|