10 Nov 11:20
Deferred Namespace Operations
Daniel Phillips <phillips <at> phunq.net>
2008-11-10 10:20:34 GMT
2008-11-10 10:20:34 GMT
Cache layering is a central idea in the Tux3 atomic update model. The cache "front end" consists of data blocks in inode page cache, inode attributes in inode cache and file names in dentry cache. The cache "back end" consists of cached file index blocks, inode table blocks, and inode table index blocks. Applications directly modify the front end cache via syscalls and memory maps, while the back end cache is modified only by the filesystem during the process of encoding changes in cache permanently to disk. The great promise of such a layering is to allow "bumpless" operation. So long as sufficient cache memory is available and any needed metadata blocks have been read into cache, the front end does not need to wait for the back end to complete its work. It just returns immediately to its caller after updating a few VFS cache objects, without needing to locate and update cached disk blocks as well. In broad outline, the concept is simple, clean and compelling. In practice, there are issues to overcome. First, some background. Changes made to front end cache are batched into "deltas"[1], where each delta comprises all the changes required to represent some set of file operations carried out by the front end, or equivalently, the changes required to make the filesystem state of the previous delta represent the cache state as of the new delta. Each new delta goes through a "setup" step that selects and assigns disk addresses for updated data blocks, modifies cached index blocks accordingly, and creates log blocks to specify index block changes logically. Following setup, the block images of a delta are transferred to disk. Finally a delta commit block is written to(Continue reading)
RSS Feed