previous | start | next

File Systems

Low Level
Higer Level

E.g., Linux VFS (virtual file system)

Window supports multiple file systems: e.g., FAT16, FAT32, NTFS

Linux VFS supports multiple file ext2, ext3, ext4, and the Windows file systems.

Linux Interface in C

Each file system has its own FileObject (below) and must provide the functions that are inserted into its FileObject's array of file_ops.

typedef struct {
  unsigned short refcount;
  struct file_ops *file_op;
  /* function pointers */
} FileObject;

Access at higher level is through an array of function pointers. Higher level uses same interface for all file systems, just a different FileObject instance.



previous | start | next