# Bcachefs

Bcachefs is a copy-on-write (COW) file system for Linux-based operating systems. Its primary developer, Kent Overstreet, first announced it in 2015, and it was added to the Linux kernel beginning with 6.7. It is intended to compete with the modern features of ZFS or Btrfs, and the speed and performance of ext4 or XFS.

## Features

Bcachefs is a copy-on-write (COW) file system for Linux-based operating systems. Features include caching, full file-system encryption using the ChaCha20 and Poly1305 algorithms, native compression via LZ4, gzip and Zstandard, snapshots, CRC-32C and 64-bit checksumming. It can span block devices, including in RAID configurations.
Earlier versions of Bcachefs provided all the functionality of Bcache, a block-layer cache system for Linux, with which Bcachefs shares about 80% of its code. As of December 2021, the block-layer cache functionality has been removed.
On a data structure level, bcachefs uses B-trees like many other modern file systems, but with an unusually large node size defaulting to 256 KiB. These nodes are internally log-structured, forming a hybrid data structure, reducing the need for rewriting nodes on update. Snapshots are not implemented by cloning a COW tree, but by adding a version number to filesystem objects. The COW feature and the bucket allocator enables a RAID implementation which is claimed to not suffer from the write hole nor IO fragmentation.

### Stability

Bcachefs describes itself as "working and stable, with a small community of users". When discussing Linux 6.9-rc3 on April 7, 2024, Linus Torvalds touched on the stability of bcachefs, saying "if you thought bcachefs was stable already, I have a bridge to sell you", and in August of 2024 that "nobody sane uses bcachefs and expects it to be stable".
In August 2024, the Debian maintainer of bcachefs-tools, a package providing "userspace tools and docs", orphaned the package, questioning its long term supportability. The maintainer further commented in a blog post that: "I’d advise that if you consider using bcachefs for any kind of production use in the near future, you first consider how supportable it is long-term, and whether there’s really anyone at all that is succeeding in providing stable support for it."

## History

Primary development has been by Kent Overstreet, the developer of Bcache, which he describes as a "prototype" for the ideas that became Bcachefs. Overstreet intends Bcachefs to replace Bcache. Overstreet has stated that development of Bcachefs began as Bcache's developers realized that its codebase had "been evolving ... into a full blown, general-purpose POSIX filesystem", and that "there was a really clean and elegant design" within it if they took it in that direction. Some time after Bcache was merged in 2013 into the mainline Linux kernel, Overstreet left his job at Google to work full-time on Bcachefs.
After a few years' unfunded development, Overstreet announced Bcachefs in 2015, at which point he called the code "more or less feature complete", and called for testers and contributors. He intended it to be an advanced file system with modern features like those of ZFS or Btrfs, with the speed and performance of file systems such as ext4 and XFS. As of 2017 Overstreet was receiving financial support for the development of Bcachefs via Patreon.
As of mid-2018, the on-disk format had settled. Patches had been submitted for review to have Bcachefs included in the mainline Linux kernel, but had not yet been accepted.
By mid-2019, the desired features of Bcachefs were completed and the associated patches to LKML were submitted for peer review. In October 2023 Bcachefs was merged into the Linux 6.7 kernel, which was released in January 2024.

## Controversy

In November 2024, Kent Overstreet was restricted by Linux's Code of Conduct Committee from sending in contributions during the Linux 6.13 kernel development cycle due to "written abuse of another community member" and taking "insufficient action to restore the community's faith in having otherwise productive technical discussions without the fear of personal attacks". Patches were later accepted without issue during the Linux 6.14 kernel development.