Kent Overstreet announced the release of Bcachefs file system 1.38.6 and declared the official removal of the experimental development label from the project. Recently, the number of incoming issue reports has decreased, and the identified bugs have become less severe and complex.
The release includes two packages: bcachefs-kernel-dkms, which contains the kernel module compiled using the Dynamic Kernel Module Support (DKMS) system, and bcachefs-tools, which provides a user-space utility for bcachefs that implements commands for creating (mkfs), mounting, recovering, and checking the file system. The packages are built for Debian, Ubuntu, Arch Linux, and are expected for Fedora, openSUSE, and NixOS. The DKMS module supports Linux kernels starting from 6.16.
Despite the unremarkable version number, due to no changes in the disk format, the 1.38.6 release includes several serious performance optimizations. About 200 changes have been made to the code managing btree structures, journaling, and ensuring file system functionality, enhancing performance. The transaction confirmation logic has been reduced to 4KB of machine code, optimizations have been added to prevent the occurrence of lock contention when working with btrees, and the journal flush process is completely free from locks.
At server With a 48-core AMD CPU, Bcachefs achieved a throughput of 16.5 GB/sec while running 48 dbench clients (in comparison, XFS achieved 16 GB/sec). Patches have been prepared but postponed for the next release that could bring performance in dbench tests up to 19 GB/sec (these patches require additional testing or changes to the disk format). When tested with the fio utility, Bcachefs achieved 700 IOPS for random write operations with 4KB blocks (XFS demonstrates one million IOPS in this test, noting that XFS is limited by block remapping, while Bcachefs completes the full CoW (Copy-on-Write) cycle with checksum verification and updates to the btree structure).
In addition to optimizations in the release of Bcachefs 1.38.6, support for connecting up to 255 devices to a single filesystem has been implemented. Packages for Ubuntu 26.04 have started to be built in the apt.bcachefs.org repository. The continuous integration and automated testing infrastructure has been transitioned to check builds based on DKMS. In the coming months, the focus will be on optimizing the filesystem's performance with multiple storage devices.
Furthermore, work on rewriting the code in Rust continues. It is noted that support for Rust in the kernel has reached a significant milestone — all major distributions have enabled the CONFIG_RUST setting by default when building kernel packages with Rust support in version 7.0. In the Bcachefs project, a set of utilities has already been rewritten in Rust.
The bcachefs-tools, which runs in user space, includes an API implementation for working with btree structures. The next release aims to integrate the prepared Rust bindings into the kernel DKMS module and start rewriting the Bcachefs core code. It is expected that using Rust will enhance flexibility, stability, and usability, making the project more appealing to young engineers and enabling formal reliability verification in the future.
The Bcachefs project is developing a filesystem aimed at combining extended functionality characteristic of Btrfs and ZFS, with the performance, reliability, and scalability typical of XFS. Bcachefs supports features such as including multiple devices in a partition, layered storage layouts (with the lower layer consisting of frequently accessed data on fast SSDs and the upper layer containing less frequently accessed data from hard drives), replication (RAID 1/10), caching, transparent data compression (using LZ4, gzip, and ZSTD modes), state snapshots, integrity verification via checksums, error correction codes, and storing information in an encrypted format (utilizing ChaCha20 and Poly1305).
Significant innovations added to Bcachefs in recent months include:
- The 'reconcile' mechanism (rebalance_v2), unlike the 'rebalance' mode, allows for rebalancing not only data (for example, replicating multiple copies to different storage devices) but also metadata in the file system (for instance, for transferring metadata after adding an additional storage device to the pool). Reconcile is applicable for all I/O operations, not just for background copying and compression tasks. In reconcile, changes in device settings are automatically accounted for, and degraded data and metadata are immediately re-replicated.
- Support for error correction codes that enable recovery of corrupted data, similar to RAID 5/6. The implementation is based on Reed-Solomon coding, capable of correcting up to N errors in a stripe when N redundant blocks are available. Automatic recovery of degraded stripes is ensured. The application of recovery codes is applicable in configurations with storage devices of different sizes.
Source: opennet.ru
