Requirements for a File System Implementation
File system implementations differ in how they implement the predefined operations.
However, the logical file system expects that a file system implementation meets the following criteria:
- All vfs and v-node operations must supply a return value:
- A return value of 0 indicates the operation was successful.
- A nonzero return value is interpreted as a valid error number (taken from the /usr/include/sys/errno.h file) and returned through the system call interface to the application program.
- All vfs operations must exist for each file system type,
but can return an error upon startup. The following are the necessary vfs operations:
- vfs_cntl
- vfs_mount
- vfs_root
- vfs_statfs
- vfs_sync
- vfs_unmount
- vfs_vget
- vfs_quotactl
For a complete list of file system operations, see List of Virtual File System Operations.