& |
tmpfs was merged into the official NetBSD source tree on September 10th, 2005. Since then, the code has received multiple improvements and fixes which are only available in the official tree. The documentation written for this project was also finished and merged on January 28th, 2006. Please note that this page may be removed in the not-so-distant future.
At the moment, NetBSD includes a memory-based file-system called mfs. mfs is is just an implementation of the regular ffs - designed for persistent storage - on top of the (volatile) virtual memory system. This means that it uses the same data structures as the on-disk implementation, rendering less than optimal performance and memory usage.
The NetBSD operating system is in a need of an efficient memory file-system that uses its own data structures to manage the stored files. The main design goal is to make it use the correct amount of memory to work correctly and efficiently; no more, no less.
The visible goals of the project will be:
You might want to read the original proposal for some more information.
Check out all posts in my blog that begin with the "SoC:" string for information about the process in the project's development.
You may want to subscribe to the RSS or Atom feeds for convenience.
This project provides a file-system driver for the kernel. In order to use it, the kernel must be patched to recognize the new code, and the files providing it must be copied in place. This is a tedious task to be done by hand, so a simple script, setup.sh is provided; it will take care to configure your existing NetBSD source tree to accept tmpfs.
In other words, follow these steps:
Existing related documentation:
Also, you may want to check all the steps I'm following to develop tmpfs. The list is very compact and maybe not self-explanatory; these are just notes that I will use to write the "file-system how-to".
At last, in case you want to verify the stability of the file-system, you can to run the regression tests provided with it. First of all, you have to be the super-user in order to do them; when you are, simply go to ${NETBSDSRCDIR}/regress/sys/fs/tmpfs/ and execute make regress within it. Even though, some of the tests want to run some commands as an unprivileged user; if you want these parts to be executed, you must tell the scripts which user to use. Assumming the user is named foo, do this instead: make regress TEST_ARGS=-ufoo. Furthermore, if you want the tests to be really verbose, pass the -v2 flag to them. Note that this can take a while depening on your CPU speed and can crash the system.
The following existing interfaces and subsystems are used by tmpfs. The list shows interesting manual pages and files specific to them:
|