4 releases

✓ Uses Rust 2018 edition

0.0.4 Oct 11, 2019
0.0.3 Oct 10, 2019
0.0.2 Oct 10, 2019
0.0.1 Oct 10, 2019

#185 in Filesystem

Download history 23/week @ 2020-03-22 16/week @ 2020-03-29 14/week @ 2020-04-05 41/week @ 2020-04-12 52/week @ 2020-04-19 36/week @ 2020-04-26 11/week @ 2020-05-03 8/week @ 2020-05-10 5/week @ 2020-05-17 10/week @ 2020-05-24 31/week @ 2020-05-31 7/week @ 2020-06-14 5/week @ 2020-06-21 10/week @ 2020-06-28 10/week @ 2020-07-05

75 downloads per month

MIT/Apache

23KB
610 lines

btfs

A basic simple in-memory file-system using b-trees.

FUSE Example

Set up FUSE:

$ apt-get install fuse libfuse-dev

# Make sure fuse.conf has allow_root and user_allow_other set:
$ cat /etc/fuse.conf
allow_root
user_allow_other

Test the system:

$ RUST_LOG=trace cargo run --bin fuse /tmp/test

Unmount:

$ umount /tmp/test

Testing with filebench

Installing filebench:

$ git clone https://github.com/filebench/filebench.git
$ libtoolize
$ aclocal
$ autoheader
$ automake --add-missing
$ autoconf
$ ./configure
$ make

Running a benchmark:

$ mkdir -p /tmp/fbtest
$ cargo run --release --bin fuse -- /tmp/fbtest/ &

$ echo 0 > /proc/sys/kernel/randomize_va_space
$ ./filebench -f randomrw.f

$ umount /tmp/fbtest

lib.rs:

A simple implementation of an in-memory files-sytem written in Rust using the BTreeMap data-structure.

This code is inspired from https://github.com/bparli/bpfs and was modified to work with node-replication for benchmarking.

Dependencies

~2.5MB
~58K SLoC