bcachefs
{{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
| 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 (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.{{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}}{{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=www.phoronix.com |language=en}} 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.{{sfn|Larabel|2015}} Features include caching,{{sfn|Larabel|2018}} full file-system encryption using the ChaCha20 and Poly1305 algorithms,{{sfn|Baader|2017}} native compression{{sfn|Larabel|2018}} via LZ4, gzip{{cite web | url=https://bcachefs-docs.readthedocs.io/en/latest/options.html#compression-types | title=Options — bcachefs documentation }} and Zstandard,{{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}} snapshots,{{sfn|Larabel|2018}} CRC-32C and 64-bit checksumming.{{sfn|Larabel|2015}} It can span block devices, including in RAID configurations.{{sfn|Baader|2017}}
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.{{sfn|Edge|2018}} 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.{{cite web |title=Architecture |url=https://bcachefs.org/Architecture/ |website=bcachefs.org}} Snapshots are not implemented by cloning a COW tree, but by adding a version number to filesystem objects.{{cite web |title=Snapshots |url=https://bcachefs.org/Snapshots/ |website=bcachefs.org}} 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".{{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}} 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",{{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}} and in August of 2024 that "nobody sane uses bcachefs and expects it to be stable".{{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}}
In August 2024, the Debian maintainer of bcachefs-tools, a package providing "userspace tools and docs", orphaned the package, questioning its long term supportability.{{cite web | url=https://www.phoronix.com/news/Debian-Orphans-Bcachefs-Tools | title=Debian Orphans Bcachefs-Tools: "Impossible to Maintain in Debian Stable" }} 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."{{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}}
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.{{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 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.{{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 or Btrfs, with the speed and performance of file systems such as ext4 and XFS.{{sfn|Larabel|2015}} As of 2017 Overstreet was receiving financial support for the development of Bcachefs via 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, but had not yet been accepted.{{sfn|Larabel|2018}}
By mid-2019, the desired features of Bcachefs were completed and the associated patches to LKML were submitted for peer review.{{sfn|LKML|2021}}{{sfn|LKML|2022}}
In October 2023 Bcachefs was merged into the Linux 6.7 kernel,{{Cite web |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=www.phoronix.com |language=en}} which was released in January 2024.
Controversy
{{Expand section|date=February 2025}}
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".{{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 |author=Dan Williams |language=en |quote=- Scope: Decline all pull requests from Kent Overstreet during the Linux 6.13 kernel development cycle. |archive-url=http://web.archive.org/web/20241127075315/https://lore.kernel.org/lkml/6740fc3aabec0_5eb129497@dwillia2-xfh.jf.intel.com.notmuch/ |archive-date=2024-11-27 }}{{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 |url-status=live |access-date=2025-03-14 |website=www.phoronix.com |language=en}} Patches were later accepted without issue during the Linux 6.14 kernel development.{{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 |url-status=live |access-date=2025-03-14 |website=Phoronix}}
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
}}
- {{cite web
|last = Edge
|first = Jake
|title = An update on bcachefs
|work = 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
}}
- {{cite web
|last = Jackson
|first = Joab
|title = Former Google engineer revs up a new Linux filesystem
|work = 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
}}
- {{cite web
|last = Larabel
|first = Michael
|title = A New Linux File-System Aims For Speed While Having ZFS/Btrfs-Like Features
|work = 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
}}
- {{cite web
|last = Larabel
|first = Michael
|title = Bcachefs File-System Is Working On Going Upstream In The Linux Kernel
|work = 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
}}
- {{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|https://bcachefs.org/}}
{{File systems}}
{{Portal bar|Free and open-source software|Linux}}
Category:Compression file systems
Category:File systems supported by the Linux kernel