# Bcachefs

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Bcachefs
> Markdown URL: https://mediated.wiki/source/Bcachefs.md
> Source: https://en.wikipedia.org/wiki/Bcachefs
> Source revision: 1348013671
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Copy-on-write file system for Linux}}
{{infobox file system
| name                    = Bcachefs
| full_name               =
| developer               = Kent Overstreet
| variants                = 
| introduction_date       = {{Start date and age|2015|08|21|df=yes}}
| partition_id            =
| directory_struct        = Hybrid B+ tree
| file_struct             = Extents
| bad_blocks_struct       = None recorded
| min_volume_size         =
| max_volume_size         =
| max_file_size           =
| max_files_no            =
| max_filename_size       =
| max_dirname_size        =
| max_directory_depth     =
| dates_recorded          = modification (mtime), attribute modification (ctime), access (atime), create (crtime)
| date_range              =
| date_resolution         =
| forks_streams           =
| attributes              = Extended attributes
| file_system_permissions = POSIX (+ ACL in xattrs)
| compression             = Yes
| encryption              = Yes
| data_deduplication      =
| OS                      = [Linux](/source/Linux)
| bootable                =
| filename_character_set  =
| file_types              =
| introduction_os         =
| file_size_granularity   =
| copy_on_write           = Yes
| website                 = {{URL|https://bcachefs.org/}}
}}
'''Bcachefs''' is a [copy-on-write](/source/copy-on-write) (COW) [file system](/source/file_system) for [Linux](/source/Linux)-based operating systems. It is intended to compete with the modern features of [ZFS](/source/ZFS) or [Btrfs](/source/Btrfs).

It was first announced it in 2015, and it was added to the [Linux kernel](/source/Linux_kernel) beginning with 6.7 in 2024.<ref>{{Cite web |title=kernel/git/torvalds/linux.git - Linux kernel source tree |url=https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9e87705289667a6c5185c619ea32f3d39314eb1b |access-date=2023-10-31 |website=git.kernel.org |archive-date=2023-11-08 |archive-url=https://web.archive.org/web/20231108213624/https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9e87705289667a6c5185c619ea32f3d39314eb1b |url-status=live }}</ref><ref name=":0">{{Cite web |last=Larabel |first=Michael |date=2024-01-07 |title=Linux 6.7 Released With Bcachefs, Intel Meteor Lake In Good Shape & Nouveau GSP Support |url=https://www.phoronix.com/news/Linux-6.7-Released |access-date=2024-01-07 |website=phoronix.com |language=en}}</ref> In June 2025,  [Linus Torvalds](/source/Linus_Torvalds) announced bcachefs would be ejected from the kernel as a result of repeated violations of kernel development guidelines.<ref name=":1" /><ref name=":2" /> In August 2025, bcachefs status was changed from 'Supported' to 'Externally maintained'.<ref>{{Cite web |title=MAINTAINERS: mark bcachefs externally maintained |url=https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ebf2bfec412ad293a0b118fb1a20a551088ebc9b |access-date=2025-09-12 |website=git.kernel.org}}</ref> As of late September 2025, Linus Torvalds has removed all Bcachefs code from the Linux Kernel, beginning with version 6.18.<ref>{{Cite web |title=Linus Torvalds Removes The Bcachefs Code From The Linux Kernel |url=https://www.phoronix.com/news/Bcachefs-Removed-Linux-6.18 |access-date=2025-09-30 |website=www.phoronix.com |language=en}}</ref> It is now available as an external module.

==Features==
Bcachefs is a [copy-on-write](/source/copy-on-write) (COW) [file system](/source/file_system) for [Linux](/source/Linux)-based operating systems.{{sfn|Larabel|2015}} Features include [caching](/source/Cache_(computing)),{{sfn|Larabel|2018}} full file-system [encryption](/source/encryption) using the [ChaCha20](/source/ChaCha20) and [Poly1305](/source/Poly1305) algorithms,{{sfn|Baader|2017}} native [compression](/source/Data_compression){{sfn|Larabel|2018}} via [LZ4](/source/LZ4_(compression_algorithm)), [gzip](/source/gzip)<ref>{{cite web | url=https://bcachefs-docs.readthedocs.io/en/latest/options.html#compression-types | title=Options — bcachefs documentation | access-date=2023-06-20 | archive-date=2023-06-20 | archive-url=https://web.archive.org/web/20230620191956/https://bcachefs-docs.readthedocs.io/en/latest/options.html#compression-types | url-status=live }}</ref> and [Zstandard](/source/Zstandard),<ref name="b.PoO">{{cite web |last1=Overstreet |first1=Kent |title=bcachefs: Principles of Operation |url=https://bcachefs.org/bcachefs-principles-of-operation.pdf |access-date=10 May 2023 |date=18 Dec 2021 |archive-date=26 August 2023 |archive-url=https://web.archive.org/web/20230826082604/https://bcachefs.org/bcachefs-principles-of-operation.pdf |url-status=live }}</ref> [snapshots](/source/Snapshot_(computer_storage)),{{sfn|Larabel|2018}} [CRC-32C](/source/Cyclic_redundancy_check) and 64-bit [checksum](/source/checksum)ming.{{sfn|Larabel|2015}} It can span block devices, including in [RAID](/source/RAID) configurations.{{sfn|Baader|2017}}

Earlier versions of Bcachefs provided all the functionality of [Bcache](/source/Bcache), a block-layer [cache](/source/cache_(computing)) system for Linux, with which Bcachefs shares about 80% of its code.{{sfn|Edge|2018}} As of December 2021, the block-layer cache functionality has been removed.<ref name="b.PoO"/>

On a data structure level, bcachefs uses [B-tree](/source/B-tree)s like many other modern file systems, but with an unusually large node size defaulting to 256&nbsp;KiB. These nodes are internally [log-structured](/source/Log-structured_merge-tree), forming a hybrid data structure, reducing the need for rewriting nodes on update.<ref>{{cite web |title=Architecture |url=https://bcachefs.org/Architecture/ |website=bcachefs.org |access-date=2023-05-26 |archive-date=2023-10-31 |archive-url=https://web.archive.org/web/20231031193000/https://bcachefs.org/Architecture/ |url-status=live }}</ref> Snapshots are not implemented by cloning a COW tree, but by adding a version number to filesystem objects.<ref>{{cite web |title=Snapshots |url=https://bcachefs.org/Snapshots/ |website=bcachefs.org |access-date=2023-05-26 |archive-date=2023-11-06 |archive-url=https://web.archive.org/web/20231106035120/https://bcachefs.org/Snapshots/ |url-status=live }}</ref>

The COW feature and the bucket allocator enables a RAID implementation which is claimed to not suffer from the [write hole](/source/write_hole) nor IO fragmentation. On the other hand, the bucket allocator necessitates the use of a copying garbage collector for dealing with mostly-empty buckets.<ref name="b.PoO"/>

===Stability===
Bcachefs describes itself as "working and stable, with a small community of users".<ref name="website_202404">{{cite web |title=bcachefs.org |url=https://bcachefs.org|archive-url=https://web.archive.org/web/20240403041655/https://bcachefs.org/ |archive-date=2024-04-03}}</ref> When discussing Linux 6.9-rc3 on April 7, 2024, [Linus Torvalds](/source/Linus_Torvalds) touched on the stability of bcachefs, saying "if you thought bcachefs was stable already, [I have a bridge to sell you](/source/wiktionary%3AI_have_a_bridge_to_sell_you)",<ref name="lkml_01">{{cite mailing list|title=Linux 6.9-rc3|last=Torvalds|first=Linus|author-link=Linus Torvalds|date=2024-04-07|url=https://lore.kernel.org/lkml/CAHk-=whDuqyVC6xMkOnNt2EeTd-s4uqa3sYghj5UzkELFW2bpw@mail.gmail.com/|mailing-list=[Linux kernel mailing list](/source/Linux_kernel_mailing_list)|access-date=2024-04-22|archive-date=2024-04-22|archive-url=https://web.archive.org/web/20240422185730/https://lore.kernel.org/lkml/CAHk-=whDuqyVC6xMkOnNt2EeTd-s4uqa3sYghj5UzkELFW2bpw@mail.gmail.com/|url-status=live}}</ref> and in August 2024 that "nobody sane uses bcachefs and expects it to be stable".<ref>{{cite web |title=Linux kernel mailing list |url=https://lore.kernel.org/lkml/CAHk-=wj1Oo9-g-yuwWuHQZU8v=VAsBceWCRLhWxy7_-QnSa1Ng@mail.gmail.com/|archive-url=https://web.archive.org/web/20240824204850/https://lore.kernel.org/lkml/CAHk-=wj1Oo9-g-yuwWuHQZU8v=VAsBceWCRLhWxy7_-QnSa1Ng@mail.gmail.com/ |archive-date=2024-08-24}}</ref>

In August 2024, the Debian maintainer of bcachefs-tools, a package providing "userspace tools and docs", orphaned the package, questioning its long term supportability.<ref>{{cite web | url=https://www.phoronix.com/news/Debian-Orphans-Bcachefs-Tools | title=Debian Orphans Bcachefs-Tools: "Impossible to Maintain in Debian Stable" | access-date=2024-08-30 | archive-date=2024-09-28 | archive-url=https://web.archive.org/web/20240928014720/https://www.phoronix.com/news/Debian-Orphans-Bcachefs-Tools | url-status=live }}</ref> 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."<ref>{{cite web |title=Orphaning bcachefs-tools in Debian |date=August 2024 |url=https://jonathancarter.org/2024/08/29/orphaning-bcachefs-tools-in-debian/|archive-url=https://web.archive.org/web/20240831172347/https://jonathancarter.org/2024/08/29/orphaning-bcachefs-tools-in-debian/|archive-date=2024-08-31}}</ref>

==History==
Primary development has been by Kent Overstreet, the developer of [Bcache](/source/Bcache), which he describes as a "prototype" for the ideas that became Bcachefs. Overstreet intends Bcachefs to replace Bcache.{{sfn|Edge|2018}} 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](/source/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](/source/Google) to work full-time on Bcachefs.{{sfn|Larabel|2015}}

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{{sfn|Jackson|2015}} like those of [ZFS](/source/ZFS) or [Btrfs](/source/Btrfs), with the speed and performance of file systems such as [ext4](/source/ext4) and [XFS](/source/XFS).{{sfn|Larabel|2015}} As of 2017 Overstreet was receiving financial support for the development of Bcachefs via [Patreon](/source/Patreon).{{sfn|Baader|2017}}

As of mid-2018, the on-disk format had settled.{{sfn|Edge|2018}} Patches had been submitted for review to have Bcachefs included in the mainline Linux kernel.{{sfn|Larabel|2018}}

By mid-2019, the desired features of Bcachefs were completed and the associated patches to [LKML](/source/Linux_kernel_mailing_list) were submitted for peer review.{{sfn|LKML|2021}}{{sfn|LKML|2022}} In October 2023 Bcachefs was merged into the Linux 6.7 kernel,<ref>{{Cite web |first=Michael |last=Larabel |title=Bcachefs Merged Into The Linux 6.7 Kernel |url=https://www.phoronix.com/news/Bcachefs-Merged-Linux-6.7 |access-date=2023-10-31 |website=Phoronix |language=en |archive-date=2023-10-31 |archive-url=https://web.archive.org/web/20231031094854/https://www.phoronix.com/news/Bcachefs-Merged-Linux-6.7 |url-status=live }}</ref> which was released in January 2024.<ref name=":0" />

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".<ref>{{cite mailing list |url=https://lore.kernel.org/lkml/6740fc3aabec0_5eb129497@dwillia2-xfh.jf.intel.com.notmuch/ |title=Re: [PATCH 1/2 v2] bcachefs: do not use PF_MEMALLOC_NORECLAIM |date=2024-11-22 |access-date=2024-12-17 |mailing-list=linux-kernel@vger.kernel.org |first=Dan |last=Williams |language=en |quote=- Scope: Decline all pull requests from Kent Overstreet during the Linux 6.13 kernel development cycle. |archive-url=https://web.archive.org/web/20241127075315/https://lore.kernel.org/lkml/6740fc3aabec0_5eb129497@dwillia2-xfh.jf.intel.com.notmuch/ |archive-date=2024-11-27 |url-status=live }}</ref><ref>{{Cite web |last=Larabel |first=Michael |date=2024-11-20 |title=Bcachefs Changes Rejected Reportedly Due To CoC, Kernel Future 'Uncertain' |url=https://www.phoronix.com/news/Bcachefs-Uncertain-Kernel-Issue |access-date=2025-03-14 |website=Phoronix |language=en |archive-date=2025-03-18 |archive-url=https://web.archive.org/web/20250318013043/https://www.phoronix.com/news/Bcachefs-Uncertain-Kernel-Issue |url-status=live }}</ref> Patches were later accepted without issue during the Linux 6.14 kernel development.<ref>{{Cite web |last=Larabel |first=Michael |date=2025-01-21 |title=Bcachefs Changes Merged Without Issue For The Linux 6.14 Kernel |url=https://www.phoronix.com/news/Bcachefs-Linux-6.14-Merged |access-date=2025-03-14 |website=Phoronix |archive-date=2025-03-18 |archive-url=https://web.archive.org/web/20250318070129/https://www.phoronix.com/news/Bcachefs-Linux-6.14-Merged |url-status=live }}</ref>

In June 2025, Linus Torvalds announced bcachefs would be removed from the Linux kernel; Linus explained as follows:<ref name=":1">{{Cite web |last=Torvalds |first=Linus |date=2025-06-26 |title=Re: [GIT PULL] bcachefs fixes for 6.16-rc4 |url=https://lore.kernel.org/all/CAHk-=wi+k8E4kWR8c-nREP0+EA4D+=rz5j0Hdk3N6cWgfE03-Q@mail.gmail.com/ |access-date=2025-06-28 |website=Linux Kernel Archives}}</ref><ref name=":2">{{cite web |first=Sourav |last=Rudra |title=New Linux Kernel Drama: Torvalds Drops Bcachefs Support After Clash |url=https://news.itsfoss.com/linux-kernel-bcachefs-drop/ |website=It's FOSS News |access-date=28 June 2025 |language=en |date=27 June 2025}}</ref>

{{quote|multiline=yes|[...] I think we'll be parting ways in the 6.17 merge window.

You made it very clear that I can't even question any bug-fixes and I should just pull anything and everything.

Honestly, at that point, I don't really feel comfortable being involved at all, and the only thing we both seemed to really fundamentally agree on in that discussion was "we're done".}}

In August 2025, after not merging any bcachefs updates for Linux 6.17, Torvalds marked bcachefs as "Externally maintained" in the Linux kernel.<ref>{{cite web |last=Larabel |first=Michael |date=2025-08-29 |title=Linus Torvalds Marks Bcachefs As Now "Externally Maintained" |url=https://www.phoronix.com/news/Bcachefs-Externally-Maintained |website=Phoronix |access-date=2025-09-13 |language=en |archive-url=https://web.archive.org/web/20250829204144/https://www.phoronix.com/news/Bcachefs-Externally-Maintained |archive-date=2025-08-29 |url-status=live}}</ref> In September 2025, Overstreet announced that bcachefs would move to being shipped as a [Dynamic Kernel Module Support](/source/Dynamic_Kernel_Module_Support) (DKMS) module.<ref>{{cite web |last=Larabel |first=Michael |date=2025-09-11 |title=Bcachefs Outlines Plans For Shipping As A DKMS Out-Of-Tree Kernel Module |url=https://www.phoronix.com/news/Bcachefs-DKMS-Plans |website=Phoronix |access-date=2025-09-13 |language=en |archive-url=https://web.archive.org/web/20250912004116/https://www.phoronix.com/news/Bcachefs-DKMS-Plans |archive-date=2025-09-12 |url-status=live}}</ref>

==References==
{{Reflist|20em}}

===Works cited===

{{Refbegin|40em}}
* {{cite web
 |last         = Baader
 |first        = Hans-Joachim
 |title        = Neue Version von Bcachefs bringt Verschlüsselung
 |trans-title  = New version of bcachefs brings encryption
 |language     = de
 |work         = {{ill|Pro-Linux|de}}
 |url          = https://www.pro-linux.de/news/1/24562/neue-version-von-bcachefs-bringt-verschl%C3%83%C6%92%C3%86%E2%80%99%C3%83%E2%80%A0%C3%A2%E2%82%AC%E2%84%A2%C3%83%C6%92%C3%A2%E2%82%AC%C5%A1%C3%83%E2%80%9A%C3%82%C2%BCsselung.html
 |date         = 2017-03-17
 |access-date  = 2018-11-23
 |archive-date = 2018-11-23
 |archive-url  = https://web.archive.org/web/20181123201035/https://www.pro-linux.de/news/1/24562/neue-version-von-bcachefs-bringt-verschl%C3%83%C6%92%C3%86%E2%80%99%C3%83%E2%80%A0%C3%A2%E2%82%AC%E2%84%A2%C3%83%C6%92%C3%A2%E2%82%AC%C5%A1%C3%83%E2%80%9A%C3%82%C2%BCsselung.html
 |url-status   = live
}}
* {{cite web
 |last         = Edge
 |first        = Jake
 |title        = An update on bcachefs
 |work         = [LWN.net](/source/LWN.net)
 |url          = https://lwn.net/Articles/755276/
 |date         = 2018-05-23
 |access-date  = 2018-11-22
 |archive-url  = https://web.archive.org/web/20180601085215/https://lwn.net/Articles/755276/
 |archive-date = 2018-06-01
 |url-status   = live
}}
* {{cite web
|last        = Jackson
|first        = Joab
|title        = Former Google engineer revs up a new Linux filesystem
|work        = [PC World](/source/PC_World)
|url        = https://www.pcworld.com/article/2974489/ex-google-revs-up-a-new-linux-filesystem.html
|date        = 2015-08-21
|access-date        = 2018-11-22
|archive-date        = 2020-12-05
|archive-url        = https://web.archive.org/web/20201205030721/https://www.pcworld.com/article/2974489/ex-google-revs-up-a-new-linux-filesystem.html
|url-status        = live
}}
* {{cite web
 |last         = Larabel
 |first        = Michael
 |title        = A New Linux File-System Aims For Speed While Having ZFS/Btrfs-Like Features
 |work         = [Phoronix](/source/Phoronix)
 |url          = https://www.phoronix.com/scan.php?page=article&item=bcache-fs-linux&num=1
 |date         = 2015-08-21
 |access-date  = 2018-11-22
 |archive-url  = https://web.archive.org/web/20150823125906/https://www.phoronix.com/scan.php?page=article&item=bcache-fs-linux&num=1
 |archive-date = 2015-08-23
 |url-status   = live
}}
* {{cite web
 |last         = Larabel
 |first        = Michael
 |title        = Bcachefs File-System Is Working On Going Upstream In The Linux Kernel
 |work         = [Phoronix](/source/Phoronix)
 |url          = https://www.phoronix.com/scan.php?page=news_item&px=Bcachefs-Linux-Upstream-Start
 |date         = 2018-05-09
 |access-date  = 2018-11-22
 |archive-url  = https://web.archive.org/web/20180709190450/https://www.phoronix.com/scan.php?page=news_item&px=Bcachefs-Linux-Upstream-Start
 |archive-date = 2018-07-09
 |url-status   = live
}}
* {{cite web
|last = LKML
|title = bcachefs status update (it's done cooking; let's get this sucker merged)
|work = Linux Kernel Mailing List
|url = https://lkml.org/lkml/2019/6/10/762
|date = 2019-06-10
}}
* {{cite web
|last = LKML
|title = bcachefs status update - current and future work
|work = Linux Kernel Mailing List
|url = https://lkml.org/lkml/2021/11/4/715
|date = 2021-11-04
|access-date = 2021-12-02
}}
* {{cite web
|last = LKML
|title = bcachefs
|work = Linux Kernel Mailing List
|url = https://lkml.org/lkml/2022/2/16/130
|date = 2022-02-16
|access-date = 2022-09-14
}}
{{Refend}}

==External links==
* {{Official website|https://bcachefs.org/}}

{{File systems}}
{{Portal bar|Free and open-source software|Linux}}

Category:2015 software
Category:Compression file systems
Category:File systems supported by the Linux kernel
Category:Linux file system-related software
Category:Disk file systems

---
Adapted from the Wikipedia article [Bcachefs](https://en.wikipedia.org/wiki/Bcachefs) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Bcachefs?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
