XaiJu
bcachefs
bcachefs

patreon


Per inode checksumming, compression options

Just pushed out a patch to add per-inode options for some options that could previously only be set globally. Currently this is just checksum type and compression type, but more will be added in the future. The options are exposed as xattrs, and if you set them on a directory they'll be inherited on create.

For example:

$ setfattr -n bcachefs.data_checksum -v none /mnt/foo

$ setfattr -n bcachefs.compression -v lz4 /mnt/foo

The options will take effect for newly written data - there isn't (yet) any way to tell bcachefs to rewrite existing data according to the current options.

The options have the same names and possible values as the filesystem options - you can cat the sysfs options (e.g. /sys/fs/bcachefs/<uuid>/options/compression) to see the possible values.

Comments

Yes, snapshots. And send, receive, diff functions.

Igor Velkov

Do you have any plans for implementing subvolumes?

Yeah, you can hack it by initrd/initramfs(it already works like that by calling switch_root[chroot as fallback]), but it needs maintenance (with grub on encrypted btrfs/lvm there's enough configuration ;-) And in case of btrfs subvolumes (vs partitions/lvm) you don't need to plan space requirements for each filesystem, you don't need to resize them, etc. Separated filesystems were good for rotaqtional drives(less fragmentation), but who cares about that in case of COW and SSD (at least on desktop/laptop ;-) I recently bought few 8TB drives for laptop(want to get rid external USB drives), and I know I will be low on space from beginning, and it's hard to guess which collection will grow quicker(photos, movies or maybe music ;-) With subvolumes you don't need to reorganize your space every few months(copying such amounts of data takes time and increases writes to NAND.) Your filesystem has inbuilt encryption support(if it would be supported by GRUB2, including raid1), then I could eliminate LUKS layer and simplify fstab/grub2/initrd configuration. With addition of subvolumes, it would be much better FS IMHO than btrds, and by mainlining it, you could simply deprecate btrfs ;-)

Perhaps. The main reason for implementing subvolumes would be for snapshotting, to make it possible to only snapshot part of the filesystem. If you just want to have multiple installations on the same filesystem, I imagine it should be possible to do that with some initramfs hackey, though I haven't tried it.

Kent Overstreet

Best news from months :-) (lately I started thinking that bcachefs is dead, while no news about encryption for btrfs). I wanted to ask about one thing(that makes btrfs superior to bcachefs for now), "subvolumes" support (it's really nice things when you have multiple linux distros and there's never enough space on hdd/ssd). Do you plan to support subvolumes? (If not, could you explain why?)


More Creators