This is a simple draft document of the MimeFS translator I am doing. The idea is to warp a filesystem tree with a deforming mirror: most of the files are accessed normally (like a mirrorfs or a symlink would do), but actions can be associated with special files, for example to run a tarfs translator for tar files. There are several parts in the mimefs: - Identifying files This could be done using something similar to the 'file' command; reusing file's magic list. I fear this would be too expensive (opening and reading a bit of each seen file can cost a lot, and even more if you stack a mimefs on top of a ftpfs or nfs). For the first version, I think that a regexp match on filenames (to match extensions, like .tar.gz) would be enough, and far less time-consuming. Full identification using magic should be avaiable at user option, and users should be able to enable it on some part of the FS tree but not on some others. - Main handling system The core system will proceed RPC (implement the netfs callbacks) and call the appropritate functions of the plugins. Plugins will handle part of the filesystem tree. The idea is to avoid having to run a separate translator for every special node (like an arfs for every .deb file in /var/cache/apt/archive). So, we'll try to have plugins (.so) which can be loaded into mimefs to proceed with a specific type of files. For the first version, plugins will only support dir_readdir and io_read, to allow people to, for example, cd into a png and then cat "x", "y", "comment", "depth"; or to run readonly tarfs translators on the data.tar.gz inside .deb. Only nodes with underlying ports will support other functions (like nodes mirrored from the original filesystem or nodes for autostarted translators). - Translator running The last part of the main handling system will be to run translators like tarfs to handle mime-types; and will then mirror those translators as usual. Of course, all that should be recursive (a .png inside a .tar.gz inside a .deb should be handled like a normal .png). - Basic mirroring plugin This plugin will handle the mirroring of an underlying filesystem. It'll be use both for the basic filesystem and for mirroring (and warping) the trees of runned translators (like tarfs). - Configuration file parser, command line parser - Caching features To improve performances, mimefs will not perform queries on underlying trees for each dir_readdir or file_name_lookup, but will cache the requests in its own tree; a mean to detect change son the underlying node and then to invalidate our cache will be needed (notify ?) More details will come soon ;)