Bcachefs

From Wikipedia, the free encyclopedia
Bcachefs
Developer(s)Kent Overstreet
Introduced21 August 2015; 8 years ago (2015-08-21)
Structures
Directory contentsHybrid B+ tree
File allocationExtents
Bad blocksNone recorded
Features
Dates recordedmodification (mtime), attribute modification (ctime), access (atime), create (crtime)
AttributesExtended attributes
File system
permissions
POSIX (+ ACL in xattrs)
Transparent
compression
Yes
Transparent
encryption
Yes
Copy-on-writeYes
Other
Supported
operating systems
Linux
Websitebcachefs.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. It self-describes as "stable", as of December 2022.[3]

Features[edit]

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

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

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

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.[9] 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.[4]

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

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

By mid-2019, the desired features of Bcachefs were completed and the associated patches to LKML were submitted for peer review.[13][14] In September 2023 the filesystem was merged in linux-next, a development tree of the Linux kernel where new features are tested before inclusion in the mainline tree.[15]

In October 2023 Bcachefs was merged into the Linux 6.7 kernel,[16] 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. ^ "bcachefs". bcachefs.org.
  4. ^ a b c d Larabel 2015.
  5. ^ a b c d Larabel 2018.
  6. ^ a b c Baader 2017.
  7. ^ "Options — bcachefs documentation".
  8. ^ a b c Overstreet, Kent (18 Dec 2021). "bcachefs: Principles of Operation" (PDF). Retrieved 10 May 2023.
  9. ^ a b c Edge 2018.
  10. ^ "Architecture". bcachefs.org.
  11. ^ "Snapshots". bcachefs.org.
  12. ^ Jackson 2015.
  13. ^ LKML 2021.
  14. ^ LKML 2022.
  15. ^ "Bcachefs Merged Into Linux-Next". www.phoronix.com. Retrieved 2023-09-12.
  16. ^ "Bcachefs Merged Into The Linux 6.7 Kernel". www.phoronix.com. Retrieved 2023-10-31.

Works cited[edit]

External links[edit]