I have ported NetBSD's tmpfs to OpenBSD. The port should be functional
on i386 and amd64. I haven't tested on other architectures. There are
limitations: update of mount options is not supported and the number of
nodes in a tmpfs file system is limited by the number of anonymous UVM
objects we can allocate.
Otherwise, give it a go. The diff can be found at:
http://block.io/tmp/tmpfs.diff
You will need a new kernel with option TMPFS enabled, fresh include
files and mount_tmpfs. tmpfs is a better MFS, it is faster and can free
unused memory.
I have put up an updated diff at:
http://block.io/tmp/tmpfs3.diff
This diff fixes a couple of 64 vs 32-bit inconsistencies in the original
diff, as well as a missing call to uvm_vnp_uncache() upon truncation.
Many thanks to Chris Jackman for testing on sparc64.
-p.