GEFS on OpenBSD: A Early Preview
Recorded: Sept. 15, 2026, 6:01 p.m.
| Original | Summarized |
'GEFS on OpenBSD: A very early preview' - MARC [prev in list] [next in list] [prev in thread] [next in thread] List: openbsd-tech Before anyone asks: I am *not* proposing to put What is it However, the port has reached the state where (with For those who haven't watched my talk, GEFS is a https://orib.dev/gefs.pdf It's under 9,000 lines of code in kernel at the Porting Problems Consistency Protocol: Error handling and porting brain damage: Userspace tools: Posix persnicketies: Regress: Hardlinks: Kqueue: NFS: Other missing pieces: I'm sure I've forgotten some. Right now: I'm not looking to fix KNF; as things There are also a few non-fatal issues independent Getting it as one patch: https;//orib.dev/gefs.diff The git repo is hidden on shithub, and the # first, get a copy of the upstream from # now, add my server, and get just the diffs Note, I will be rebasing and force-pushing [prev in list] [next in list] [prev in thread] [next in thread] Configure | About | |
The author is presenting an early preview of the GEFS file system running on OpenBSD, emphasizing that the port is not yet production-ready and potential data loss exists, particularly during error conditions. GEFS is described as a new, crash-safe, snapshotting, and copy on write file system that the author developed for 9front and is currently porting to OpenBSD. The full description of the file system can be found in a linked document. At the time of writing, the kernel implementation of GEFS comprises under nine thousand lines of code, though the author anticipates further growth as more functionality is added. The methodology for porting is approached as creating a proper, in-kernel file system that maintains synchronization of the data structure and complex code between the Plan 9 environment and OpenBSD. The implementation relies on copying and pasting code segments, aiming to preserve the structure so that fixes can be shared; however, the differences between the two operating environments suggest that a complete porting of the code may not be feasible, making the introduction of abstraction layers counterproductive. Several significant technical challenges are identified regarding this porting effort. The consistency protocol represents a major unknown, specifically concerning the required ordering of a write to the superblock relative to all writes within a snapshot, though safety is maintained if the superblock write occurs after blocks have been committed to disk. Furthermore, error handling presents difficulties; since error handling paths are largely commented out, the author must carefully convert these paths to fit OpenBSD standards, as the error handling approach used on 9front is deemed unacceptable for OpenBSD. Other issues include constraints related to global variables that affect simultaneous mounting and discrepancies arising because the source system was not a POSIX environment. Specific features require careful implementation considerations. The author notes that userspace tools, including snapshot management and associated ioctls, must be developed. Furthermore, the system must address POSIX peculiarities, as the source base was not POSIX. Features such as hardlinks and kqueue require the implementation of reference counting logic on a per-file basis. Integration with NFS also presents hurdles, requiring the definition of necessary hooks. Beyond these specific components, further considerations include implementing support for bootloaders, adding boot environments, and managing quotas, particularly as this would allow the system to accommodate future growth without preallocating excessive space. To facilitate the process of obtaining the code, the author provides a specific procedure involving git operations. This involves cloning the OpenBSD source tree, setting up a remote reference to the GEFS repository, fetching the necessary differences, and checking out the GEFS branch within the OpenBSD source directory. The author plans to occasionally rebase and force-push these changes to keep pace with the evolution of the OpenBSD commits. Non-fatal issues, such as the slow deletion of large files, are also noted, and the author has ideas for improving these aspects. |