wiki:Projects/Refactor_the_filesystem_infrastructure

Version 2 (modified by Lekernel, on 11/25/10 at 00:59:07) (diff)

/* Refactor the filesystem infrastructure */

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 a full path 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 mount and umount calls, 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.
  • 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)
  • Instead of queuing I/O write requests at the block layer level, perhaps it could be better to queue them at the filesystem layer. This way, non-standard filesystem (e.g. NFS, or Flash filesystems that require erasure of whole blocks) can also benefit from the queuing.