Main Page

From btrfs Wiki
(Difference between revisions)
Jump to: navigation, search
(News: progs 5.16.1)
(News: progs 5.16.2)
Line 168: Line 168:
The #btrfs channel is at [], bridge works (persistent room
The #btrfs channel is at [], bridge works (persistent room
''' btrfs-progs v5.16.1 (Feb 2022) '''
''' btrfs-progs v5.16.2 (Feb 2022) '''
* mkfs: support DUP on metadata on zoned devices
* mkfs: fix detection of profile type for zoned mode when creating DUP
* subvol delete: drop warning for root when search ioctl fails
* build:
* check:
** add missing stub for zoned mode helper when zoned mode not enabled
** fix --init-csum-tree to not create checksums for extents that are not supposed to have them
** fix 64bit types on MIPS and PowerPC
** add check for metadata item levels
** improved zoned mode support autodetection, for systems with existing blkzone.h header but missing support for zone capacity
* add udev rule for zoned devices as they require mq-deadline
* other: doc updates, test updates
* build: fix redefinition of ALIGN on mixed old/new kernel/userspace (5.11)
* other: typo fixes, new tests, CI targets updated
''' linux v5.16.5 '''
''' linux v5.16.5 '''

Revision as of 22:35, 16 February 2022


btrfs is a modern copy on write (CoW) filesystem for Linux aimed at implementing advanced features while also focusing on fault tolerance, repair and easy administration. Its main features and benefits are:

  • Snapshots which do not make the full copy of files
  • RAID - support for software-based RAID 0, RAID 1, RAID 10
  • Self-healing - checksums for data and metadata, automatic detection of silent data corruptions

Development of Btrfs started in 2007. Since that time, Btrfs is a part of the Linux kernel and is under active development.

Jointly developed at multiple companies, Btrfs is licensed under the GPL and open for contribution from anyone.

List of companies using btrfs in production.

Development and Issue Reporting

For feature status, please refer to the Status page.

The Btrfs code base is stable. However, new features are still under development. Every effort is made to ensure that it remains stable and fast at each and every commit. This rapid pace of development means that the filesystem improves noticeably with every new Linux release so it's highly recommended that users run the most modern kernel possible.

For benchmarks, it's recommended to test the latest stable Linux version, and not any older, as well as the latest Linux development versions. Also, it's recommended to test the various mount options such as different compression options.

If you find any behavior you suspect to be caused by a bug, performance issues, or have any questions about using Btrfs, please email the Btrfs mailing list (no subscription required). Please report bugs on Bugzilla.


Linux has a wealth of filesystems from which to choose, but we are facing a number of challenges with scaling to the large storage subsystems that are becoming common in today's data centers. Filesystems need to scale in their ability to address and manage large storage, and also in their ability to detect, repair and tolerate errors in the data stored on disk.

Major Features Currently Implemented

  • Extent based file storage
  • 2^64 byte == 16 EiB maximum file size (practical limit is 8 EiB due to Linux VFS)
  • Space-efficient packing of small files
  • Space-efficient indexed directories
  • Dynamic inode allocation
  • Writable snapshots, read-only snapshots
  • Subvolumes (separate internal filesystem roots)
  • Checksums on data and metadata (crc32c, xxhash, sha256, blake2b)
  • Compression (ZLIB, LZO, ZSTD), heuristics
  • Integrated multiple device support
    • File Striping
    • File Mirroring
    • File Striping+Mirroring
    • Single and Dual Parity implementations (experimental, not production-ready)
  • SSD (flash storage) awareness
    • TRIM/Discard for reporting free blocks for reuse
    • Optimizations (e.g. avoiding unnecessary seek optimizations, sending writes in clusters, even if they are from unrelated files. This results in larger write operations and faster write throughput)
  • Background scrub process for finding and repairing errors of files with redundant copies
  • Online filesystem defragmentation
  • Offline filesystem check
  • In-place conversion of existing ext2/3/4 and reiserfs file systems
  • Seeding devices. Create a (readonly) filesystem that acts as a template to seed other Btrfs filesystems. The original filesystem and devices are included as a readonly starting point for the new filesystem. Using copy on write, all modifications are stored on different devices; the original is unchanged.
  • Subvolume-aware quota support
  • Send/receive of subvolume changes, efficient incremental filesystem mirroring and backup
  • Batch, or out-of-band deduplication (happens after writes, not during)
  • Swapfile support
  • Tree-checker, post-read and pre-write metadata verification
  • Zoned mode support (SMR/ZBC/ZNS friendly allocation)
  • fsverity integration

Features by kernel version

Features Currently in Development or Planned for Future Implementation

  • DAX/persistent memory support
  • The file/directory -level encryption support (fscrypt)



Guides and usage information

External Btrfs Documentation / Guides

Links to Btrfs documentation of various Linux distributions:

Manual pages

  • Original wiki documentation (obsolete, will be removed)

Developer documentation

  • Development setup - how to build btrfs from sources and prepare a development environment
  • Original COW B-tree: Source code in C that implements the COW B-tree algorithms repository. Written by Ohad Rodeh at IBM Research in 2006, and released under a BSD license. This is a reference implementation, that works in user space.
  • Unmerged features
    • In-band (write) time deduplication


New location for documentation

The new place for documentation will be at or , wiki contents is going to be migrated

IRC channel at

The #btrfs channel is at, bridge works (persistent room

btrfs-progs v5.16.2 (Feb 2022)

  • mkfs: fix detection of profile type for zoned mode when creating DUP
  • build:
    • add missing stub for zoned mode helper when zoned mode not enabled
    • fix 64bit types on MIPS and PowerPC
    • improved zoned mode support autodetection, for systems with existing blkzone.h header but missing support for zone capacity
  • other: doc updates, test updates

linux v5.16.5

  • problems defrag and autodefrag fixed in 5.16.5

linux v5.16 (Jan 2022)

Related projects: kernel port of zstd 1.4.10 also released in 5.16

Performance related:

  • misc small inode logging improvements (+3% throughput, -11% latency on sample dbench workload)
  • more efficient directory logging: bulk item insertion, less tree searches and locking
  • speed up bulk insertion of items into a b-tree, which is used when logging directories, when running delayed items for directories (fsync and transaction commits) and when running the slow path (full sync) of an fsync (bulk creation run time -4%, deletion -12%)


  • continued subpage support
    • make defragmentation work
    • make compression write work
  • zoned mode
    • support ZNS (zoned namespaces), zone capacity is number of usable blocks in each zone
    • add dedicated block group (zoned) for relocation, to prevent out of order writes in some cases
    • greedy block group reclaim, pick the ones with least usable space first
  • preparatory work for send protocol updates
  • error handling improvements
  • cleanups and refactoring

Source code download

Btrfs source repositories describes purpose and contents, here are a few quick links:

Articles, presentations, podcasts

Historical resources

Links to old or obsolete documentation, articles. Kept for historical reasons. Stuff that's more than 3 years old.

Articles, presentations, podcasts

Project information/Contact

Wiki accounts, editing

The wiki contributions are welcome! Please create an account and wait for approval (this is a necessary spam protection and we cannot remove it). You can try to catch some of the wiki admins on IRC (or ping user 'kdave' in a query) to expedite the account creation.

The registration requires full name for account but it's not mandatory from our perspective. The wiki User and User talk pages are created automatically but removed after account is approved. If you want to use the pages, create them manually, they won't be deleted.

Personal tools