Linux kernel btrfs supports fscrypt
Well that was shortlived:
https://bkhome.org/news/202403/linux-kernel-680-with-bcachefs.html
What interested me in particular about bcachefs is file checksumming, encryption and compression.
I encountered problems with 'bcachefs-tools'; firstly, there doesn't seem to be a utility to resize the filesystem. Secondly and thirdly, it is written in rust, and has to link with a lot of shared libraries. I want to compile it statically, but that looks very difficult, or rather, the final binary will be enormous.
The 'bcachefs-tools' were originally written in C, about 6 years ago; however, the guy who took over maintaining it is a rust proponent. It looks like he is gradually porting it to rust. I find that annoying, when there are perfectly OK utilities written in C and a rust idealogue wants to turn them into difficult-to-compile and super-large binaries. And probably very dependent on the rust version to compile, as rust is still a moving target. Rant over.
However, while browsing online about filesystem encryption, I discovered that 'fscrypt' is being developed for btrfs. Not yet mainlined, currently at v5 patches:
https://lore.kernel.org/linux-btrfs/20240124195831.GA1212739@perftesting/T/#t
...I downloaded all 52 of them.
Fscrypt is particularly attractive to me, as it is the same per-folder native-filesystem encryption as in ext4. So I know how to use it.
Then, btrfs brings something to the table that ext4 lacks; read-write compression.
Btrfs is also far more mature than bcachefs, and the 'btrfs-progs' package includes ability to resize a filesystem:
https://man7.org/linux/man-pages/man8/btrfs-filesystem.8.html
Btrfs-progs are written in C and readily compiled as statically-linked binaries:
https://github.com/kdave/btrfs-progs
Another important point is that I don't know of any boot manager
that will recognize a bcachefs partition.
Tags: quirky