Bcachefs

Linux file system

BcachefsDeveloper(s)| Kent Overstreet

|

Introduced| 21 August 2015; 9 years ago (2015-08-21)
Structures
Directory contents| Hybrid B+ tree
File allocation| Extents
Bad blocks| None recorded
Features
Dates recorded| modification (mtime), attribute modification (ctime), access (atime), create (crtime)
Attributes| Extended attributes
File system
permissions| POSIX (+ ACL in xattrs)
Transparent
compression| Yes
Transparent
encryption| Yes
Copy-on-write| Yes
Other
Supported
operating systems| Linux
Website| 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.[1][2] It is intended to compete with the modern features of ZFS or Btrfs, and the speed and performance of ext4 or XFS.

## Features

[edit]

Bcachefs is a copy-on-write (COW) file system for Linux-based operating systems.[3] Features include caching,[4] full file-system encryption using the ChaCha20 and Poly1305 algorithms,[5] native compression[4] via LZ4, gzip[6] and Zstandard,[7] snapshots,[4] CRC-32C and 64-bit checksumming.[3] It can span block devices, including in RAID configurations.[5]

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.[8] As of December 2021, the block-layer cache functionality has been removed.[7]

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.[9] Snapshots are not implemented by cloning a COW tree, but by adding a version number to filesystem objects.[10] The COW feature and the bucket allocator enables a RAID implementation which is claimed to not suffer from the write hole nor IO fragmentation.[7]

### Stability

[edit]

Bcachefs describes itself as "working and stable, with a small community of users".[11] 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",[12] and in August of 2024 that "nobody sane uses bcachefs and expects it to be stable".[13]

In August 2024, the Debian maintainer of bcachefs-tools, a package providing "userspace tools and docs", orphaned the package, questioning its long term supportability.[14] 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."[15]

## History

[edit]

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.[8] 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.[3]

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[16] like those of ZFS or Btrfs, with the speed and performance of file systems such as ext4 and XFS.[3] As of 2017 Overstreet was receiving financial support for the development of Bcachefs via Patreon.[5]

As of mid-2018, the on-disk format had settled.[8] Patches had been submitted for review to have Bcachefs included in the mainline Linux kernel, but had not yet been accepted.[4]

By mid-2019, the desired features of Bcachefs were completed and the associated patches to LKML were submitted for peer review.[17][18] In October 2023 Bcachefs was merged into the Linux 6.7 kernel,[19] which was released in January 2024.[2]

## References

[edit]

1. ^ "kernel/git/torvalds/linux.git - Linux kernel source tree". git.kernel.org. Retrieved 2023-10-31.
2. ^ a b Larabel, Michael (2024-01-07). "Linux 6.7 Released With Bcachefs, Intel Meteor Lake In Good Shape & Nouveau GSP Support". www.phoronix.com. Retrieved 2024-01-07.
3. ^ a b c d Larabel 2015.
4. ^ a b c d Larabel 2018.
5. ^ a b c Baader 2017.
6. ^ "Options — bcachefs documentation".
7. ^ a b c Overstreet, Kent (18 Dec 2021). "bcachefs: Principles of Operation" (PDF). Retrieved 10 May 2023.
8. ^ a b c Edge 2018.
9. ^ "Architecture". bcachefs.org.
10. ^ "Snapshots". bcachefs.org.
11. ^ "bcachefs.org". Archived from the original on 2024-04-03.
12. ^ Torvalds, Linus (2024-04-07). "Linux 6.9-rc3". Linux kernel mailing list (Mailing list).
13. ^ "Linux kernel mailing list". Archived from the original on 2024-08-24.
14. ^ https://www.phoronix.com/news/Debian-Orphans-Bcachefs-Tools
15. ^ "Orphaning bcachefs-tools in Debian". Archived from the original on 2024-08-31.
16. ^ Jackson 2015.
17. ^ LKML 2021.
18. ^ LKML 2022.
19. ^ "Bcachefs Merged Into The Linux 6.7 Kernel". www.phoronix.com. Retrieved 2023-10-31.

### Works cited

[edit]

* Baader, Hans-Joachim (2017-03-17). "Neue Version von Bcachefs bringt Verschlüsselung" [New version of bcachefs brings encryption]. Pro-Linux [de] (in German). Retrieved 2018-11-23.+[de]&rft.atitle=Neue+Version+von+Bcachefs+bringt+Verschlüsselung&rft.date=2017-03-17&rft.aulast=Baader&rft.aufirst=Hans-Joachim&rft_id=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&rfr_id=info:sid/en.wikipedia.org:Bcachefs" class="Z3988">
* Edge, Jake (2018-05-23). "An update on bcachefs". LWN.net. Archived from the original on 2018-06-01. Retrieved 2018-11-22.
* Jackson, Joab (2015-08-21). "Former Google engineer revs up a new Linux filesystem". PC World. Retrieved 2018-11-22.
* Larabel, Michael (2015-08-21). "A New Linux File-System Aims For Speed While Having ZFS/Btrfs-Like Features". Phoronix. Archived from the original on 2015-08-23. Retrieved 2018-11-22.
* Larabel, Michael (2018-05-09). "Bcachefs File-System Is Working On Going Upstream In The Linux Kernel". Phoronix. Archived from the original on 2018-07-09. Retrieved 2018-11-22.
* LKML (2019-06-10). "bcachefs status update (it's done cooking; let's get this sucker merged)". Linux Kernel Mailing List.
* LKML (2021-11-04). "bcachefs status update - current and future work". Linux Kernel Mailing List. Retrieved 2021-12-02.
* LKML (2022-02-16). "bcachefs". Linux Kernel Mailing List. Retrieved 2022-09-14.

## External links

[edit]

* Official website

* v
* t
* e

File systems

* Comparison of file systems
* distributed
* Unix filesystem

Disk and
non-rotating|

* ADFS
* AdvFS
* Amiga FFS
* Amiga OFS
* APFS
* AthFS
* bcachefs
* BFS
* Be File System
* Boot File System
* Byte File System (z/VM)
* Btrfs
* CVFS
* CXFS
* DFS
* EFS
* Encrypting File System
* Extent File System
* Episode
* ext
* ext2
* ext3
* ext3cow
* ext4
* FAT
* exFAT
* Files-11
* Fossil
* GPFS
* HAMMER
* HAMMER2
* HFS (Classic Mac OS)
* HFS (MVS)
* HFS+
* HPFS
* HTFS
* JFS
* LFS
* MFS
* Macintosh File System
* TiVo Media File System
* MINIX
* NetWare File System
* Next3
* NILFS
* NILFS2
* NSS
* NTFS
* OneFS
* OpenZFS
* PFS
* QFS
* QNX4FS
* ReFS
* ReiserFS
* Reiser4
* Reliance
* Reliance Nitro
* RFS
* SFS
* Shared File System (VM)
* Smart File System
* SNFS
* Soup (Apple)
* Tux3
* UBIFS
* UFS/UFS2
* soft updates
* WAPBL
* VxFS
* WAFL
* Xiafs
* XFS
* Xsan
* zFS (z/OS)
* ZFS (Sun)

Optical disc|

* HSF
* ISO 9660
* ISO 13490
* UDF

Flash memory and SSD|

* APFS
* FAT
* exFAT
* TFAT
* EROFS
* F2FS
* JFS
* NVFS

| host-side wear leveling|

* CHFS
* JFFS
* JFFS2
* LogFS
* NILFS
* NILFS2
* YAFFS
* UBIFS

|

Distributed parallel|

* BeeGFS
* Ceph
* CXFS
* GFS2
* Google File System
* OCFS2
* OrangeFS
* PVFS
* QFS
* Xsan
* more...

NAS|

* 9P
* AFS (OpenAFS)
* AFP
* Coda
* DFS
* Google File System
* GPFS
* Lustre
* NCP
* NFS
* POHMELFS
* Hadoop
* SMB (CIFS)
* SSHFS
* more...

Specialized|

* Aufs
* AXFS
* Boot File System
* CDfs
* Compact Disc File System
* cramfs
* Davfs2
* EROFS
* FTPFS
* FUSE
* Lnfs
* LTFS
* NOVA
* MVFS
* SquashFS
* UMSDOS
* OverlayFS
* UnionFS

Pseudo|

* configfs
* devfs
* debugfs
* kernfs
* procfs
* specfs
* sysfs
* tmpfs
* WinFS

Encrypted|

* eCryptfs
* EncFS
* EFS
* Rubberhose
* SSHFS
* ZFS

Types|

* Clustered
* Global
* Grid
* Self-certifying
* Flash
* Journaling
* Log-structured
* Object
* Record-oriented
* Semantic
* Steganographic
* Synthetic
* Versioning

Features|

* Case preservation
* Copy-on-write
* Data deduplication
* Data scrubbing
* Execute in place
* Extent
* File attribute
* Extended file attributes
* File change log
* Fork
* Links
* Hard
* Symbolic

Access control|

* Access-control list
* Filesystem-level encryption
* Permissions
* Modes
* Sticky bit

Interfaces|

* File manager
* File system API
* Installable File System
* Virtual file system

Lists|

* Cryptographic
* Default
* Log-structured

Layouts|

* Master Boot Record
* GUID Partition Table
* Apple Partition Map

Portals:

* Free and open-source software
* Linux

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template