Fork us on GitHub Follow us on Facebook Follow us on Twitter

Version 1 (modified by Jakub Jermář, 14 years ago) (diff)

Implementation and design of the file system layer

Unlike in monolitic designs, the file system functionality is spread across several layers in HelenOS:

Standard library support

The standard library translates more or less POSIX file system requests made by the user application to the VFS server frontend protocol and passes them to VFS. The library emulates some calls such as opendir(), readdir(), rewinddir() and closedir() using other calls. In this case these will be open(), read(), lseek() and close().

The VFS server accepts only absolute file paths and so the standard library takes care of providing the getcwd() and chdir() interfaces. It also translates all relative paths to absolute. Passing absolute paths may not be always optimal, but it simplifies the design of the VFS server and the libfs algorithms. In addition, thanks to this feature, the .. file path components can be processed lexically, which leads to further simplifications.

The standard library forwards all other requests, which it is unable to handle itslef, to the VFS server and does not contribute to the file system functionality by any other means. Each file system request forwarded to VFS is composed of one or more IPC phone calls.