Bcachefs is a copy-on-write file system for Linux-based operating systems.
It seems that the efforts of the author of BcacheFS have paid off, as it was recently announced that his file system has finally been accepted and merged into the Linux kernel code, specifically in the linux-next branch (which tests features for future versions of the Linux kernel).
And for just over 3 years Kent Overstreet, author of BcacheFS, has worked hard on polishing his file system so that it can be included in the code of the main branch of the Linux Kernel.
Although BcacheFS has been accepted and merged into the linux-next branch, the pull request to include the BcacheFS code in the main branch was rejected by Linus Torvalds. In comments, the father of Linux recommended that Kent Overstreet first evaluate the suitability of the proposed patches in the experimental Linux-next branch. If the review is successful, BcacheFS could be included in kernel 6.7, which is expected to be released in December.
For those unfamiliar with BcachefsFS, it is a file system developed using technologies already proven in the development of the Bcache block device, designed to cache access to slow hard drives on fast SSDs (included in the kernel since version 3.10).
screenshot that Bcachefs has already been accepted on Linux
Bcachefs uses a copy-on-write (COW) mechanism in which changes do not cause data to be overwritten: the new state is written to a new location, after which the pointer to the current state is changed.
The goal of Bcachefs is to achieve the performance, reliability, and scalability of XFS, while providing additional features from Btrfs and ZFS, such as multi-device partitioning, multi-layer drive layouts, replication (RAID 1/10), transparent caching and data, compression in LZ4, gzip, and ZSTD modes, state cuts, integrity verification using checksums, the ability to store Reed-Solomon error correction codes (RAID 5/6), and storage of information in encrypted form (using ChaCha20 and Poly1305).
In terms of performance, Bcachefs is ahead of Btrfs and other file systems based on the copy-on-write mechanism and demonstrates an operating speed close to Ext4 and XFS.
A special feature of Bcachefs is its support for multi-layer drive connections , where storage is made up of several layers: the fastest drives (SSDs) are connected to the bottom layer, which is used to cache frequently used data, and the top layer consists of more spacious and inexpensive hard drives that provide storage for less frequently used data.
Write-back mode caching can be used between layers. Drives can be dynamically added and detached from a partition without stopping use of the file system (data migrates automatically).
It's worth mentioning that one of the latest achievements in Bcachefs development is the stabilization of the writable snapshot implementation. Compared to Btrfs, snapshots in Bcachefs now scale much better and are free from the problems inherent in Btrfs. In practice, the functionality of snapshots has been tested by organizing MySQL backups.
Future plans include the desire to use the Rust language when developing Bcachefs. According to the author of Bcachefs, who prefers programming to debugging code, it would be foolish to write code in C now that a better option is available.
Rust already participates in Bcachefs in the implementation of some utilities that run in user space. Additionally, the idea is brewing to gradually rewrite Bcachefs completely in Rust, as using this language significantly saves debugging time.
Source: https://www.phoronix.com