Like any file system InterMezzo offers a VFS interface. The VFS interface will have four functions:
A key challenge for a network file system with a persistent cache is to make transactional and ordering guarantees regarding updates to the FSDB, journal and cache.
First we discuss read only calls, then file system updates.
lookup and read_inode Lookup returns a fully initialized inode/dentry to the VFS layer. Almost invariably, it calls iget, which invokes the read_inode method. InterMezzo will cache directories hence requirements for correct operation of lookup are:
Note that the operation could be split across the lookup and read_inode call. If directory data has to be acquired, InterMezzo will need to invoke presto_get_data on the directory. When data or inode has arrived from the server, an atomic update to the cache is made which installs:
If the attributes of, or the inode itself is not present then presto_getattr needs to be invoked. This will make the following updates atomically (assuming that the inode was not present yet):
opendir We will require that when opendir completes, current directory data is present on the system. This involves the steps for filling directory data outlined above in the lookup case.
open
Users of the file system are not the only processes modifying the cache and databases.