Linux 5.16.5 Released To Fix Up Btrfs' Botched Up Defragging

Written by Michael Larabel in Linux Storage on 1 February 2022 at 01:57 PM EST. 66 Comments
LINUX STORAGE
Linux 5.16.5 is out today and making it a notable point release is it fixed up the rather botched state of the Btrfs file-system code for the v5.16 kernel.

Linux 5.16 had a refactoring of the Btrfs file-system defrag code and this sadly ended up regressing things, which fortunately are fixed now for v5.16.5. Btrfs up to now on Linux 5.16 was consuming high amounts of I/O and causing performance degradation of the system.

With Linux 5.16.5 this is fixed up with changes including the possibility of a nearly infinite loop when defragging a 1 byte file and fixing the wrong number of defragged sectors. The latter change caused for much more I/O when using the "autodefrag" mount option than necessary, stemming from the v5.16 work that ended up accidentally using a byte size rather than sector size. For helping to fight off issues like this in the future, there is also restored support for allowing the defragging to be interruptible so it can be cancelled by a signal rather than needing to reboot the system.

There are also other autodefrag fixes stemming from the recent refactoring too, including a possible deadlock condition.


At least not a data loss bug, but the state Btrfs shipped for Linux 5.16 was initially less than desirable..


Long story short, if using Btrfs on Linux 5.16 you will want to make sure you are now using Linux 5.16.5 or later.

The full list of Linux 5.16.5 fixes can be found via the release announcement.
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