wiki:Projects/Refactor_the_filesystem_infrastructure

Version 6 (modified by Lekernel, on Nov 25, 2010 at 1:04:00 AM) (diff)

Refactor the filesystem infrastructure

Some ideas

  • Make the path evaluation function common to all filesystems. The current mechanism requires a lot of duplication of code into all filesystems (that contains C string manipulation, making it even worse), requires a deep understanding of the filesystem infrastructure and makes implementing new filesystems a lot more difficult and frustrating than it should be. RTEMS should handle the mount point decoding, and only call into a particular filesystem when it is actually accessed. RTEMS should provide paths relative to the mount point of the particular filesystem.
  • Optional: RTEMS might also remove ".." and "." from the path, as well as extra "/"?
  • This mechanism also removes the implementation of the mount and unmount calls in each filesystem, which further reduces the complexity of writing a new filesystem. These calls are sometimes left over for years, e.g. in the MSDOS filesystem, so this is a real issue.
  • The FUSE API is a good example.
  • Support clean unmounting of filesystems (i.e. check if files are in use, and deny the unmount)
  • Support forced unmounting of filesystems attached to a "dead" I/O device (e.g. an USB stick that was removed without being unmounted before)