Btrfs Extent Tree v2 Work Progressing For Improving The File-System's On-Disk Format

Written by Michael Larabel in Linux Storage on 31 January 2022 at 05:05 AM EST. 38 Comments
LINUX STORAGE
You may recall the news from a few months ago about the work to improve Btrfs' on-disk format in addressing "painful parts" of its design. That "extrent-tree-v2" work has been progressing and recently was queued up into the Btrfs for-next code albeit hidden behind a debug flag.

The extent-tree-v2 work by Josef Bacik was initially motivated to address locking contention within global roots and block group items being spread throughout the extent tree. With extent-tree-v2 improvements to the Btrfs design are being made as part of a long-term project to enhance Btrfs. When complete, users would need to migrate to the new on-disk format for existing file-systems and in the process lose support for booting older kernels.

While this Btrfs improvement work is still in-progress, it looks like the initial bits could land for Linux 5.18 while hidden behind the CONFIG_BTRFS_DEBUG config flag at kernel build time. The commit message adds:
THIS IS A IN DEVELOPMENT FORMAT CHANGE, DO NOT USE UNLESS YOU ARE A DEVELOPER OR A TESTER.

The format is in flux and will be added in stages, any fs will need to be re-made between updates to the format.

The initial extent-tree-v2 work was picked up by David Sterba in the Btrfs file-system "for-next" code meaning it will be found in Linux 5.18 (albeit hidden by default) unless the patches end up getting reverted. As mentioned though the work is being carried out incrementally so it would be over the course of the coming kernel releases that the extent-tree-v2 format gets firmed up. The initial shiny feature in the queued up patch series is the support for multiple global roots.


Some features are also disabled for now with extent-tree-v2 like scrubbing, snapshot creation/deletion, balancing, and other functionality that will then be restored later.

Sterba also commented on the Btrfs mailing list, "Added to misc-next. I did only a few tweaks, some messages updates, added comments. As this is is going to be a long series I'd like to suggest do do development and cleanup stages. The development so that you can drop new functional changes but the cleanup seems to be necessary as there's a lot of repeated code and otherwise it needs to be kept at sane level regarding the other code."

Those curious about the extent-tree-v2 work and other undertakings of this modern Linux file-system can track it via Btrfs for-next.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week