Summer of Code results: Generic file system mounting


September 21, 2009 posted by Antti Kantee

This year I mentored Arnaud Ysmal's Summer of Code project entitled "Generic file system mounting". This post contains a recap of the goals and presents the results.

Goals

File systems in NetBSD are mounted with the mount(2) system call. In addition to the file system type and mount target directory, the syscall takes an opaque container, "void *data". This container is filled by the mount_fs utility and interpreted by the kernel file system driver. Typically, it contains at least the device name where the file system is to be mounted from. Since the layout of the container varies based on the file system type, a special userspace utility which knows how to access that structure is currently required for every different file system. This is a problem especially for things like fs-utils, which support a large number of file systems and work on a completely abstract interface. Since these applications need to know the mount structure layout for each file system, they require file system specific code for each supported file system and cannot be considered fully pluggable.

The project's goal was to research eliminating the opaque data container from mount and instead passing parameters as a text list, possibly using proplib. The subgoals were:

  • investigating how other operating systems handle file system mounting
  • based on the previous subgoal, the specification of a protocol which can be used for replacing the opaque container argument
  • the specification of a vfs probe routine, which allows asking a file system driver if it supports the given generic mount protocol parameters
  • a working test implementation

Results

All of the project subgoals were met. A kernel with a working test implementation was succesfully booted and run. The source code, including patches to the NetBSD kernel and fs-utils is available here.

In the coming months we will continue working on the mount protocol and backwards compatibility to existing mount utilities before proposing the change on the NetBSD mailing lists.

[0 comments]

 



Post a Comment:
Comments are closed for this entry.