GEFS on OpenBSD: A Early Preview
14 hours ago
- GEFS, a crash-safe, snapshotting, copy-on-write file system originally written for 9front, is now available as an early, buggy preview on OpenBSD.
- The port is not production-ready and data loss is expected, especially on error, but remaining problems are reasonably understood for people to explore.
- The development approach is to keep data structures and code in sync between Plan 9 and OpenBSD, using code copy/paste rather than abstractions, aiming for shared fixes.
- The biggest problem is the consistency protocol for superblock writes, with some backport fixes needed from 9Front.
- Error handling is mostly commented out and needs careful conversion to OpenBSD standards; globals also limit multiple mounts.
- Userspace tools for creating and fscking GEFS are needed, as current methods require booting 9front in a VM.
- POSIX compliance issues are expected since the original system was not POSIX-based.
- There are no regression tests for OpenBSD; only a small Plan 9 test suite exists.
- Easy features like hardlinks and kqueue support are identified but require per-file refcounts.
- NFS support has hooks but unclear requirements; other missing pieces include bootloader support, quotas, and snapshot management.
- The code is under 9,000 lines in the kernel, expected to grow; not yet ready for upstreaming or code style fixes.
- Getting the code involves cloning from GitHub and pulling diffs from a shithub repo, with rebasing occasionally changing commit IDs.