Полезная информация

next up previous contents
Next: The lseek() function Up: Device Driver Basics Previous: More advanced sleeping



The Virtual Filesystem Switch, or VFS, is the mechanism which allows to mount many different filesystems at the same time. In the first versions of , all filesystem access went straight into routines which understood the minix filesystem. To make it possible for other filesystems to be written, filesystem calls had to pass through a layer of indirection which would switch the call to the routine for the correct filesystem. This was done by some generic code which can handle generic cases and a structure of pointers to functions which handle specific cases. One structure is of interest to the device driver writer; the file_operations structure.

From /usr/include/linux/fs.h:


Essentially, this structure constitutes a parital list of the functions that you may have to write to create your driver.

This section details the actions and requirements of the functions in the file_operations structure. It documents all the arguments that these functions take. [It should also detail all the defaults, and cover more carefully the possible return values.

Converted on:
Mon Apr 1 10:20:16 EST 1996