The BlackBerry 10 OS provides a rich variety of file systems. Like most service-providing processes in the OS, these file systems execute outside the kernel; applications use them by communicating via messages generated by the shared-library implementation of the POSIX API. Most of these file systems are resource managers as described in this book. Each file system adopts a portion of the pathname space (called a mountpoint) and provides file system services through the standard POSIX API ( open(), close(), read(), write(), lseek(), and so on.). File system resource managers take over a mountpoint and manage the directory structure below it. They also check the individual pathname components for permissions and for access authorizations.
This implementation means that:
- File systems may be started and stopped dynamically.
- Multiple file systems may run concurrently.
- Applications are presented with a single unified pathname space and interface, regardless of the configuration and number of underlying file systems.
- A file system running on one node is transparently accessible from any other node.
File systems and pathname resolution
You can seamlessly locate and connect to any service or file system that's been registered with the process manager. When a file system resource manager registers a mountpoint, the process manager creates an entry in the internal mount table for that mountpoint and its corresponding server ID (that is, the nd, pid, chid identifiers). This table effectively joins multiple file system directories into what users perceive as a single directory. The process manager handles the mountpoint portion of the pathname; the individual file system resource managers take care of the remaining parts of the pathname. File systems can be registered (that is, mounted) in any order.
When a pathname is resolved, the process manager contacts all the file system resource managers that can handle some component of that path. The result is a collection of file descriptors that can resolve the pathname.
If the pathname represents a directory, the process manager asks all the file systems that can resolve the pathname for a listing of files in that directory when readdir() is called. If the pathname isn't a directory, then the first file system that resolves the pathname is accessed.
For more information on pathname resolution, see Pathname management.
Last modified: 2014-11-17