The Design and Implementation of a Log-Structured File System

All data structures in LFS are written to the log. The inode map contains locations of the inodes, the inodes contain the location of the data blocks. This is followed for both files and directories (which are just special files whose data consists of file names and inode numbers within that directory). The checkpoint region (not shown in this image) stores the location of the blocks of the inode map and is stored at a fixed location on the disk. However, the checkpoint region is updated lazily. By storing all the data structures in the log (and ensuring that the one structure not in the log is written to lazily), LFS is able to (almost) always write to the disk in large sequential segments.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store