XFS FUSE Implementation
Student: KhaledEmara (<mail AT KhaledEmara DOT dev>)
Mentors: AlanSomers and PedroGiffuni
Project Description
This project is part of GSoC'21. In this project, I've worked on a read-only userland implementation of the XFS Filesystem through the FUSE kernel interface. This involved writing the client in Rust using the fuse crate.
Deliverables
- XFS library.
- Read basic structures such as the Super Block and the AGI.
- Parse Extents.
- Parse and Navigate variable-length B+Trees.
- Parse and Navigate fixed-length B+Trees.
- Read and Traverse directories:
- Short Form directories.
- Block directories.
- Leaf directories.
- Node directories.
- B+Tree directories.
- Read files:
- Extent-based files.
- B+Tree-based files.
- Read symbolic links:
- Short Form symbolic links.
- Extent-based symbolic links.
- Read extended attributes:
- Short Form extended attributes.
- Leaf extended attributes.
- Node extended attributes.
- B+Tree extended attributes.
- FUSE glue code.
- stat the filesystem.
- Access control.
- Return standard Unix file attributes.
- Both stateless directories and with state files implementations.
- Some Unit Tests.
- Metadata integrity checks.
- CRC32C check.
- UUID checks.
- Magic Number checks.
- Block Number checks.
- FreeBSD Ports package.
Test Plan
Some unit tests have been written, but the coverage is weak. The coverage could be expanded as a future plan. I have also tested the filesystem manually and verified each functionality.
Weekly Progress
The Code
The code was maintained in a GitHub repo that I own. Patches were usually pushed directly to the main branch. I included a little bit of documentation on how to run the project, how it's structured, and how to start contributing to it in the README.md and CONTRIBUTING.md files. I also included a man page as a documentation on how to use. Finally, I have included a License that is compatible with FreeBSD. Code was written from scratch in this repo. All the project's target were met.
I have attached a patch file to create the necessary files in order to create a FreeBSD ports package.
What Lies Ahead
I think first and foremost I have test again and again and iron out all the bugs if found. Secondly, I have to refactor the code for better readability and performance. Finally and as for additional features, we could add journal logs support or add write support, although the latter would be a huge undertaking.