The primary function of the DMFS file system layer is to provide user processes transparent access to migrated data. It determines if an operation would access non-resident portions of the underlying file. If so, it requests that the dmfsd daemon restore the file, and then blocks the operation until the file is sufficiently restored so that the operation may proceed. One feature present in DMFS is that when a process is blocked awaiting file restoration, it may be interrupted. As a practical matter, a user may kill (^C) a blocked process.
Another main function of the DMFS layer also is to preserve the integrity of the metadata it and the userland dmfsd databases keep regarding files. It does so in two ways.
First, it records the generation number of the underlying vnode. When an operation (such as name lookup) causes the allocation of a DMFS vnode, the recorded generation number is compared with the generation number of the underlying vnode. In case of a discrepancy, the information in both the kernel and userland databases is invalidated. Likewise these databases are invalidated when the last reference to an unlinked vnode is released.
The second area of metadata preservation keeps a file from getting in an inconsistent state. The present metadata format permits recording that a portion of an archived file is resident, but does not permit noting that only a portion of a file is archived. The possibility of file inconsistency would arise if the on-disk portion of a non-resident file were permitted to be modified. For simplicity, such cases are forbidden at present. Thus any writes or truncations to a non-resident file are blocked until the file is fully restored.