- Notifications
You must be signed in to change notification settings - Fork1
xv6::file_system re-implemented in Rust and FUSE.
License
foreverbell/xv6fs
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Reimplementation of the file system used byxv6in Rust and FUSE.
xv6's file system follows the early design of Linux's journaling file system(namely, extfs2), which supports recovery in presence of crash. For details,please refer to thexv6 book.
Normally, a file system should be abstracted into these layers.
- disk
- block cache
- logging (journaling, transaction)
- inode
- directory
- path resolution
- file object / descriptor
We use FUSE's low level API, which manages these last two layers conforming withUnix. The remaining work is to implement the top five layers and cooperatethem with FUSE interface.
Notice: for convenience, we mock the disk with an array of contiguous 512 bytesin memory, with an interface providing synchronized atomic block read / write.This disk acts as a service running in a separated thread, and communicate withthe file system in a Go routine fashion (which should be similar to IDEinterruption implemented in xv6).
Preparations.
- a nightly Rust compiler (known to compile with
rustc 1.27.0-nightly
). - libfuse-dev (ubuntu, find substitution for yourself if using other Linux distros).
$ make run
Then we have a mounted file system at./mnt/
.
$cd mnt$ touch foobar
Conforming with xv6 (seeLICENSE
).