Get the latest tech news

SquirrelFS: Using the Rust compiler to check file-system crash consistency


This work introduces a new approach to building crash-safe file systems for persistent memory. We exploit the fact that Rust's typestate pattern allows compile-time enforcement of a specific order of operations. We introduce a novel crash-consistency mechanism, Synchronous Soft Updates, that boils down crash safety to enforcing ordering among updates to file-system metadata. We employ this approach to build SquirrelFS, a new file system with crash-consistency guarantees that are checked at compile time. SquirrelFS avoids the need for separate proofs, instead incorporating correctness guarantees into the typestate itself. Compiling SquirrelFS only takes tens of seconds; successful compilation indicates crash consistency, while an error provides a starting point for fixing the bug. We evaluate SquirrelFS against state of the art file systems such as NOVA and WineFS, and find that SquirrelFS achieves similar or better performance on a wide range of benchmarks and applications.

View a PDF of the paper titled SquirrelFS: using the Rust compiler to check file-system crash consistency, by Hayley LeBlanc and 3 other authors View PDFHTML (experimental) Abstract:This work introduces a new approach to building crash-safe file systems for persistent memory. We employ this approach to build SquirrelFS, a new file system with crash-consistency guarantees that are checked at compile time.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Rust

Rust

Photo of rust compiler

rust compiler

Related news:

News photo

Farm: Fast vite compatible build tool written in Rust

News photo

My experience crafting an interpreter with Rust (2021)

News photo

Zig vs. Rust at work: the choice we made