The SPIN NameServer.T type defines a basic directory
object with which one can represent directory nodes for file systems.
Using the NameServer.T as the super type of file
system directories allows us to use common file system tools,
such as ls and cat, to list objects
in the global name space in addition to the file system name space.
The FileSystem module is the top-level manager for all file systems. The SPIN file system is a subsystem of spin space. Thus, in theory, it supports all the operations provided by the basic name server (though, some of the operations may raise exceptions if a particular file system is not powerful enough to support them). In addition, it provides the interface to register and deregister, mount and unmount file system. It also provides an interface to get the current root file system directory.
The global root contains two directories, svc and
fs. The svc directory is used to hold SPIN
internal names such as domain names and nanny placeholder.
The fs directory is the root of the file system, and
it is written as "/". Passing
FileSystem.Lookup with "/" returns the file
system root. To get the global root, use "/.." (for
example, /../svc/domains).
There is a similar but slightly different lookup procedure called
NameServer.Lookup. They differ only in the root directory from which
traversal starts. NameServer.LookupName traverses the
name from "/.." (aka global root), and
FileSystem.LookupName traverses the name from
"/" (aka file system root).
To avoid confusion resulting from having two different roots, it is
strongly recommended that "/.." is used to represent the
global root even in NameServer.LookupName(note:
.. in the global root points to itself).
Below are some of the standard directories used in SPIN.
/". This is the file system root.
/...
Mount code should be moved to spincore, and we should do more traditional mount table lookup (as in bsd).