HN
Today

GEFS on OpenBSD: A Early Preview

Ori’s GEFS, a crash-safe, copy-on-write filesystem from Plan 9, is making its way to OpenBSD in a very early, very buggy preview. This post on the OpenBSD-tech mailing list details the porting challenges and current state of the in-kernel filesystem, which is explicitly not ready for primetime. It’s popular on HN because it highlights ambitious low-level systems work, blending retro computing philosophies with modern OS development challenges.

5
Score
1
Comments
#5
Highest Rank
3h
on Front Page
First Seen
Sep 15, 5:00 PM
Last Seen
Sep 15, 7:00 PM
Rank Over Time
1156

The Lowdown

A new filesystem named GEFS, originally developed for the Plan 9 derivative 9front, is now being ported to OpenBSD. This mailing list post by Ori details the 'very early preview' of the port, emphasizing that it's far from production-ready, with expected data loss and numerous known issues. Despite its nascent state, the project offers a fascinating glimpse into the complexities of bringing a non-POSIX-native filesystem into the OpenBSD kernel environment.

  • What is GEFS? GEFS is a novel, crash-safe, snapshotting, copy-on-write filesystem. It was initially written for 9front and is currently under 9,000 lines of kernel code, with a detailed description available in a PDF.
  • Porting Strategy: The author is implementing GEFS as a proper in-kernel filesystem for OpenBSD, maintaining data structure synchronization with the Plan 9 version while copying code directly. The goal is code "rhyming" to facilitate shared fixes, eschewing abstraction layers due to differing environment requirements.
  • Current State: The port is a "rough, buggy, issue-filled preview" and is emphatically not ready for production use, with data loss being a known expectation. However, the developer notes that most remaining problems are reasonably understood.
  • Key Challenges Identified: Significant hurdles include perfecting the consistency protocol for superblock writes, re-engineering error handling to meet OpenBSD's stricter standards, developing native userspace tools (as relying on a 9front VM for fsck isn't ideal), addressing POSIX compliance subtleties, and creating an OpenBSD-specific test suite.
  • Missing Features: Important features like hardlinks, kqueue support, NFS integration, bootloader support, boot environments, and quotas are yet to be implemented. Quotas are specifically mentioned as crucial for managing the growth of build artifacts like those from LLVM.
  • Accessing the Code: Developers interested in experimenting can find a patch file or get the code via Git, noting that the author will frequently rebase and force-push the development branch to keep up with OpenBSD-current.

This early preview of GEFS on OpenBSD represents a significant undertaking in low-level systems development. While it's a long road from this initial release to a stable, production-ready filesystem, the project showcases the ambition of integrating a unique filesystem design into a highly opinionated operating system.