Check out the new USENIX Web site. next up previous
Next: Comparing VLFS with LFS Up: A Virtual Log Previous: Maintaining and Recovering the

Implementing LFS on the Virtual Log

 

So far, we have described 1) a generic logging strategy that can support transactional behavior, and 2) an indirection map built on the log that can support location independence of data. One advantage of this approach is that we can implement eager writing behind a logical disk interface and deliver its performance advantage to an unmodified file system. We now describe another application of the virtual log: implementing a variant of the log-structured file system (VLFS). Unlike the logical disk approach above, VLFS requires modifying the disk interface to the host file system. By seeking a tighter integration of the file system into the programmable disk, however, VLFS allows a number of optimizations impossible with an unmodified UFS. Currently, we have not directly implemented VLFS. Instead, the experiments in Section 5 are based on file systems running on the virtual log via the logical disk interface as described in the last section. We indirectly deduce the VLFS performance by evaluating these file systems.


Figure 4:   Implementing LFS on the virtual log. The virtual log contains only the inode map blocks.

One disadvantage of the indirection map as described in Section 3.1 is the amount of storage space and the extra I/O's needed to maintain and query the map. To solve this inefficiency, the file system can store physical addresses of the data blocks in the inodes, similar to the approach taken by LFS shown in Figure 4. As file blocks are written, the data blocks, the inode blocks that contain physical addresses of the data blocks, and inode maps that contain physical addresses of the inodes are all appended to the log. What is different in the virtual log based implementation (VLFS) is that the log need not be physically contiguous, and only the inode map blocks logically belong to the virtual log. This is essentially adding a level of indirection to the indirection map. The advantage is that the inode map, which is the sole content of the virtual log, is now compact enough to be stored in memory; it also reduces the number of I/O's needed to maintain the indirection map because VLFS simply takes advantage of the existing indirection data structures in the file system without introducing its own.

Another LFS optimization that can also be applied to VLFS is checkpointing for recovery. Periodically, we write the entire inode map to the disk contiguously. At recovery time, while LFS reads a checkpoint at a known disk location and rolls forward, VLFS traverses the virtual log backwards from the log tail towards the checkpoint.

VLFS also opens up a variety of questions including how to re-engineer the host/disk interface and how to implement the free space compactor. These issues are discussed in a technical report [35].


next up previous
Next: Comparing VLFS with LFS Up: A Virtual Log Previous: Maintaining and Recovering the

Randolph Wang
Tue Jan 5 14:30:32 PST 1999