Show Your Support: This site is primarily supported by advertisements. Ads are what have allowed this site to be maintained on a daily basis for the past 18+ years. We do our best to ensure only clean, relevant ads are shown, when any nasty ads are detected, we work to remove them ASAP. If you would like to view the site without ads while still supporting our work, please consider our ad-free Phoronix Premium.
Btrfs Extent Tree v2 Work Progressing For Improving The File-System's On-Disk Format
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.