next up previous contents
Next: 9.3.4 Createfs Up: 9.3 Persistent File Systems Previous: 9.3.2 Replicfs

   
9.3.3 Expirefs

A file system that will set an expiration date for the files within. This additional information will be recorded using Statefs. A file which expired will be a good candidate for removal. This file system is useful for a multi-user shared temporary space, for USENET news articles that need to get removed automatically after articles expire, and more.

There is one serious problem with such a file system. There is no convenient way to pass expiration date information between user-level processes and the in-kernel file system. Vnode operations such as vn_getattr return predetermined information such as uid, gid, file size, last access time, last modification time, last create/mode-change time, etc. The information being passed cannot be changed. Some implementation have left a few empty bytes in this attributes structure, meant for later use. So I could use it for my additional information, but that would not be portable or a vendor supported option for long term use.

The best method for manipulating this information is for Expirefs to provide an additional mount point, besides the one it directly interposes upon. The ``shadow'' mount point will have a different vnode operations vector (this alone may qualify it to become a different file system) that will provide a file for every file in the file system being interposed. These ``dummy'' files would have no real storage space associated with them, only a real inode. One of the three time fields (access, modification, creation) of the inode will be used to record the expiration date of the file. That way, programs like ls and find can continue to function almost normally.


next up previous contents
Next: 9.3.4 Createfs Up: 9.3 Persistent File Systems Previous: 9.3.2 Replicfs
Erez Zadok
1999-12-07