Linux Kernel & OS

Kernel developers debate rewriting XArray in Rust for XFS

Key Takeaway

Daniel Gomez proposed rewriting the XArray data structure in Rust to improve security and performance for XFS, but kernel developers expressed caution at Kangrejos 2026.

Summary

At Kangrejos 2026, Daniel Gomez led a discussion on converting XArray—used by XFS—to Rust. The motivation stems from difficulties in supporting block sizes larger than page size on XFS, compounded by stable-kernel users not testing new XFS code early. Gomez cited potential security and performance gains, though other kernel developers raised concerns about the rewrite.

Why XArray and why Rust

  • XArray is a radix-tree-like data structure used by XFS and other kernel subsystems for indexing
  • XFS development is hampered by stable-kernel users who do not test new code until it reaches long-term releases
  • Gomez argues Rust's memory safety could reduce bugs in this critical data structure
  • Performance improvements were also cited as a potential benefit
  • Other kernel developers raised unspecified concerns about replacing the existing C implementation

Why it matters

A Rust-based XArray would be a significant test case for Rust in the Linux kernel beyond drivers, potentially paving the way for more core data structure rewrites if successful.

Original reference: lwn.net →