Side project announcement: btrfs-fuse
Hi guys,
Some may have already noticed that, there is a small project call btrfs- fuse under active development:
https://github.com/adam900710/btrfs-fuse
I guess it's time to properly announce the project, a FUSE *read-only* btrfs implementation.
Although btrfs is already mainlined for a long time, there are still something that even a read-only implementation can help:
- Education
Good luck if you're a newbie interested in modern filesystems, and just start reading the kernel btrfs code.
It's already over 133K C lines, not to mention the complex relationship between VFS and block layer.
This project only has 3K lines of C code (excluding headers which include ondisk format, various compatible helpers).
With my special educational comments among the 3K lines of C code.
- Better and easier subpage/multi-page support
I just feel reborn when I don't need to bother page operations in kernel.
- For certain bootloader
In a galaxy not far, far away, there are some bootloader projects requiring GPLv3+ license, thus kernel/progs code can not be utilized.
But filesystem is getting more and more complex, especially for btrfs. Without a proper maintained fs implementation, things will get out-of- control eventually.
This project is crafted from scratch with MIT license, only certain external libraries are from GPLv2+ or GPLv2-only kernel code. (But to make newbie to get familiar with the kernel/progs code, most
function/structure names are kept the same as kernel/progs).
Hopes one day btrfs-fuse can be crossported to those projects.
But this new project hasn't yet reach v1.0, as there is some limitations:
- RAID5/6 read support
Already working on that.
- stat::st_dev and stat::st_ino
Currently FUSE will override st_dev, thus no way to use st_dev to indicate subvolume boundary, and duplicated st_ino in different subvolumes will make tools like find unhappy.
Will explore a different way to represent st_ino.
Currently I'm still testing the project with fsstress (to generate a btrfs using kernel) and fssum (to verify both kernel and btrfs-fuse are reporting the same content), which should be pretty comprehensive. Will convert the tests to a self-test eventually.
Extra tests and contribution are always helpful!
Happy learning btrfs details!
Thanks,
Qu