Btrfs Picks Up New Features For Linux 6.7

Written by Michael Larabel in Linux Storage on 30 October 2023 at 03:37 PM EDT. 36 Comments
LINUX STORAGE
While we wait to see if Bcachefs will be merged for Linux 6.7, there are other exciting enhancements landing for existing Linux file-systems. With Btrfs in Linux 6.7 comes three new features plus some performance optimizations and other improvements.

The three new Btrfs features for Linux 6.7 are a RAID stripe tree, simple quota accounting, and the temporary file-system ID "FSID" support. The temporary file-system ID support for Btrfs in particular is quite notable and is one of the features desired by Valve for Btrfs with their Steam Deck. Igalia carried out that Btrfs feature work on Valve's behalf.

Btrfs feature for the Steam Deck


As for these new features, the Btrfs pull request sent out today sums it up simply:
- raid-stripe-tree
New tree for logical file extent mapping where the physical mapping may not match on multiple devices. This is now used in zoned mode to implement RAID0/RAID1* profiles, but can be used in non-zoned mode as well. The support for RAID56 is in development and will eventually fix the problems with the current implementation. This is a backward incompatible feature and has to be enabled at mkfs time.

- simple quota accounting (squota)
A simplified mode of qgroup that accounts all space on the initial extent owners (a subvolume), the snapshots are then cheap to create and delete. The deletion of snapshots in fully accounting qgroups is a known CPU/IO performance bottleneck. The squota is not suitable for the general use case but works well for containers where the original subvolume exists for the whole time. This is a backward incompatible feature as it needs extending some structures, but can be enabled on an existing filesystem.

- temporary filesystem fsid (temp_fsid)
The fsid identifies a filesystem and is hard coded in the structures, which disallows mounting the same fsid found on different devices. For a single device filesystem this is not strictly necessary, a new temporary fsid can be generated on mount e.g. after a device is cloned. This will be used by Steam Deck for root partition A/B testing, or can be used for VM root images.

Also significant is performance work to reduce reservations for checksum deletions, which on a sample workload for a file with many extents led to the deletion time being decreased by 12%. There is also work to make extent state merges more efficient during insertions and that led to a run-time of critical functions being reduced by 5%.

Btrfs in Linux 6.7 also drops its integrity check functionality plus has various other low-level code improvements.
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