I was recently accepted for a Google Summer of Code’08 project. I will be adding subfile support to FFS for NetBSD.
Things to work on:
An IFSFDIR:
* is referenced by exactly one base inode, add a back pointer to the inode struct
* contents are same as normal directory, struct direct.
* contains a “.” entry that references the IFSFDIR.
* contains a “..” entry that references the base inode
* entries may only reference IFSFREG there may be no subdirectories or device nodes
* is instantiated on demand
* is removed when the base inode is removed
* does not have independent access control (uid, gid, mode), refer the the base inode
An IFSFREG:
* is just like an IFREG
* could (should?) contain a back pointer to the IFSFDIR
* can only have a link count of 1
* can be deleted explicitly (see subfile_remove(), below)
* is deleted when the base inode is deleted
* does not have independent access control (uid, gid, mode), refer the the base inode
When a base inode is deleted, the subfile tree has to be deleted also. Changes to remove() would be needed.
Both of these open functions would return a normal file descriptor to the subfile upon a successful open, a fd that can be used with normal read, write, close, etc.
If you would like to research a bit on subfiles, I suggest these links: