OpenBSD GEFS file system advances with mkfs tools, error handling, and consistency protocol work
Ori Bernstein's GEFS for OpenBSD now supports userspace formatting tools and improved error handling, though a write-ordering consistency protocol remains the largest blocker before general use.
Summary
Ori Bernstein has published a significant update to GEFS, the "Good Enough File System" being ported to OpenBSD from 9front. The new code incorporates community patches, rebases against the latest source, and adds userspace utilities including mkfs support for creating GEFS volumes on OpenBSD for the first time. Error handling has been substantially reworked with the goal of correct behavior under failure conditions, and important bugfixes from the upstream 9front project have been forward-ported.
The file system now reserves the first block for disklabels, avoiding a superblock collision. Planned userspace tools include a gefs control program for snapshots and debugging, with commands modeled on 9front's ctl file interface. The largest remaining gap is a consistency protocol for ordered writes; Bernstein is studying OpenBSD's historic softupdates implementation and proposes syncer kernel processes with synchronous I/O and pinned buffer cache flags for arena headers and superblocks.
GEFS implementation progress and open consistency challenges
- Userspace tooling: New mkfs support enables GEFS volume creation on OpenBSD, with a planned gefs control utility for debug toggling, reserve management, snapshot retention, snapshot renaming, and fork operations.
- Error handling: The error path code has been systematically reviewed and updated with the aim of correct failure behavior, though the author notes theory may still diverge from practice in edge cases.
- Forward-ported fixes: Critical bugfixes from the upstream 9front GEFS implementation have been integrated into the OpenBSD port.
- Block layout change: The first file system block is now left unused by default to accommodate disklabels, preventing superblock placement conflicts.
- Consistency protocol gap: The commit-phase ordering barrier mechanism remains unimplemented; the proposed design uses generation-sorted priority queues, syncer kprocs with synchronous block I/O, and buffer cache pinning for arena headers and superblocks to prevent dangerous reordering.
Why it matters
A new native file system for OpenBSD would diversify storage options beyond FFS and improve the project's long-term independence from legacy code. For BSD developers and systems researchers, GEFS offers a testbed for log-structured design ideas and cross-pollination with the Plan 9-derived 9front ecosystem. If the consistency protocol succeeds, GEFS could eventually provide snapshot and versioning capabilities not present in OpenBSD's default FFS.
Original reference: undeadly.org →