Btrfs With Linux 6.2 Bringing Performance Improvements, Better RAID 5/6 Reliability

Written by Michael Larabel in Linux Storage on 12 December 2022 at 04:50 PM EST. 97 Comments
LINUX STORAGE
The Btrfs and EXT4 file-system updates for the Linux 6.2 merge window have been submitted. The Btrfs changes are rather notable with continued performance enhancements as well as making some reliability improvements to its native RAID5/RAID6 modes.

The EXT4 pull request sent out this morning has a bunch of clean-ups and bug fixes. Many of the fixes to the EXT4 come as a result of Syzbot and fuzzing of the file-system driver. But for end-users the EXT4 changes aren't too notable or exciting for this mature file-system.

When it comes to Btrfs with Linux 6.2 is where it's more interesting with performance work and enhancing the RAID 5/6 operation. Btrfs' RAID 5/6 code was in bad shape years ago but has been seeing fixes over the past few years. But still as of last year users were "strongly discouraged" from creating Btrfs RAID5/RAID6 arrays.


Btrfs RAID 5/6 support is slowly improving...


With Linux 6.2 there are various reliability improvements for this native RAID 5/6 mode:
- raid56 reliability vs performance trade off
- fix destructive RMW for raid5 data (raid6 still needs work) - do full RMW cycle for writes and verify all checksums before overwrite, this should prevent rewriting potentially corrupted data without notice

- stripes are cached in memory which should reduce the performance impact but still can hurt some workloads

- checksums are verified after repair again

- this is the last option without introducing additional features (write intent bitmap, journal, another tree), the RMW cycle was supposed to beavoided by the original implementation exactly for performance reasons but that caused all the reliability problems

Aside from the RAID5/RAID6 work, Btrfs with Linux 6.2 now enables async discard by default for supported devices. Btrfs also lands a flush emergency reserve feature and has a variety of performance improvements to the fiemap / lseek / send code. The Btrfs code has also seen work in preparing for eventual FSCRYPT support for native file-system encryption via that Linux encryption framework.

Overall the Btrfs patches for Linux 6.2 is a rather exciting mix of 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