A New Problem: Garbage Collection
Let's discuss how LFS employs garbage collection to remove the outdated file structures on the disk, thus making room for subsequent writes.
We'll cover the following...
You may have noticed another problem with LFS; it repeatedly writes the latest version of a file (including its inode and data) to new locations on disk. This process, while keeping writes efficient, implies that LFS leaves old versions of file structures scattered throughout the disk. We (rather unceremoniously) call these old versions garbage.
Examples
For example, let’s imagine the case where we have an existing file referred to by inode number , which points to a single data block . We now update that block, generating both a new inode and a new data block. The resulting on-disk layout of ...
Access this course and 1400+ top-rated courses and projects.