Bcachefs For Linux 6.11 Landing Disk Accounting Rewrite & Self-Healing On Read I/O Error

Written by Michael Larabel in Linux Storage on 15 July 2024 at 05:59 AM EDT. 18 Comments
LINUX STORAGE
Bcachefs maintainer Kent Overstreet has already sent out all of the exciting Linux 6.11 feature updates for this copy-on-write file-system. Bcachefs continues maturing nicely within the mainline Linux kernel while continuing to tack on new functionality.

Bcachefs with this next kernel version is landing stripe sectors accounting, the much anticipated rewrite to the disk accounting code, self healing support on read I/O errors or checksum errors, converting to the new mount API, and better lockdep coverage. There are also various fixes, debugging improvements, and other minor refinements.

Kent Overstreet explained the disk accounting rewrite in the merge request as:
"The previous disk accounting scheme relied heavily on percpu counters that were also sharded by outstanding journal buffer; it was fast but not extensible or scalable, and meant that all accounting counters were recorded in every journal entry.

The new disk accounting scheme stores accounting as normal btree keys; updates are deltas until they are flushed by the btree write buffer.

This means we have no practical limit on the number of counters, and a new tagged union format that's easy to extend.

We now have counters for compression type/ratio, per-snapshot-id usage, per-btree-id usage, and pending rebalance work."

The other exciting feature is the new self healing capabilities when encountering any read error or checksum errors. Bcachefs will now attempt to automatically rewrite data if an error is occurred in order to try a successful data write on the second try. The Bcachefs self-healping capabilities have been in development for a while.

SSD with bandage


The stripe sectors accounting for Bcachefs meanwhile will help ensure their erasure coding is working properly.

More details on all of the Bcachefs feature patches ready for the Linux 6.11 merge window via this pull request.
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