I've been making progress on ext4fs driver for OpenBSD current, after upgrading and messing with CVS directories a couple of times I've updated the code to read block descriptor groups so now mounting my test ext4fs partition into /mnt works and listing the parent directory / gives proper info on /mnt so lstat on root inode works !
Now I'm having panics and don't really know what to do so if you want to help out please reach out.
See the progress on Github.
I now have read-only support of ext4fs at 200MB/s and also read/write support at almost 500KB/s from a USB3 key drive formatted on Linux (Debian) ext4.
e2fsprogs on OpenBSD provides e2fsck and mkfs.ext4, compatible with Linux userland and on-disk format of this new driver.
No Linux source files were ever read to build this driver. It's pure AI (ChatGPT and Claude-code) and careful code reviews and error checking and building kernel and rebooting/testing from my part.
I now have full read/write support of ext4fs in OpenBSD-current ! Performances are 64MB/s reading and 256MB/s writing (from cache) on a recent NVMe SSD drive.
Will send patches to the mailing lists very soon.
Faster speed with clustered reads gives 600MB/s read/write throughput on a NVMe. In comparison FFS2 gives 830MB/s read/write speed on the same disk. That's a 38% difference in transfer throughput.
Patch : https://www.kmx.io/static/patches/OpenBSD-current-ext4fs.diff
I don't really know why people would say OpenBSD has no filesystem, FFS2 is superior to ext4 in any way possible regarding speed. Extent and block bitmap updates are slower than FFS2 solid block allocation.
Now I also have journal replay at mount time and orphan inodes cleaning as per two flags in unclean Linux ext4 filesystems : RECOVER and ORPHAN_PRESENT. I will publish a patch with this after another session of careful audit and reviewing.
Now why is this possible : I lack the knowledge of OpenBSD's internals but managed to push features through anyway. AI's are powerful to dig into the source code once you give it to them. They do not store the full source code in all its madness of versions and other dimensions in their LLMS they need the space for cupcake recipes. But they know the keywords and know how to search for you. Sometimes they ask for permission to access Linux source files and every time I would just say no, find another way. Reverse engineering was simple. I did crc32c with ChatGPT and we took days to reverse engineer the failed attempt at implementing a RFC from the ext4 documentation part, which is wrong. I might push patches to the official ext4 doc or just complain that even Linux does not follow the spec.
Main differences between official Ext4 documentation and on-disk data :
Now actually the LLM did not even try take inspiration into Linux source code at all almost except 5 times maybe, before I stopped it. The actual source of most of the code was actually OpenBSD-current sys/ufs/ext2fs which has write support with ok performances.
After dicussion with OpenBSD devs they seem to think that no AI code can be copyrighted by a human, which I find far fetched but entirely possible so I will remove all AI-generated code and keep only the parts which I wrote myself entirely.