Log-structured file system: Difference between revisions

Content deleted Content added
Rationale: Article needs additional citations for verification.
Minor grammar fixes
 
Line 2:
{{about|the general concept of log-structured file systems|the NetBSD file system|Log-structured File System (BSD)|the Linux log-structured Flash file system|LogFS}}
 
A '''log-structured filesystem''' is a [[file system]] in which data and metadata are written sequentially to a [[circular buffer]], called a [[log file|log]]. The design was first proposed in 1988 by [[John K. Ousterhout]] and Fred Douglis in 1988 and first implemented in 1992 by Ousterhout and [[Mendel Rosenblum]] for the Unix-like [[Sprite (operating system)|Sprite]] distributed operating system.<ref name="rblub">{{citation|title=The Design and Implementation of a Log-Structured File System|url=https://people.eecs.berkeley.edu/~brewer/cs262/LFS.pdf|publisher=University of California, Berkeley|year = 1991|first1 = Mendel Rosenblum.|last1 =John K. Ousterhout}}</ref>
 
== Rationale ==
Line 16:
* Recovery from crashes is simpler. Upon its next mount, the file system does not need to walk all its data structures to fix any inconsistencies, but can reconstruct its state from the last consistent point in the log.
 
Log-structured file systems, however, must reclaim free space from the tail of the log to prevent the file system from becoming full when the head of the log wraps around to meet it. The tail can release space and move forward by skipping over data for whichwhere newer versions exist further ahead in the log. If there are no newer versions, then the data is moved and appended to the head.
 
To reduce the overhead incurred by this [[garbage collection (computer science)|garbage collection]], most implementations avoid purely circular logs and divide up their storage into segments. The head of the log simply advances into non-adjacent segments which are already free. If space is needed, the least-full segments are reclaimed first. This decreases the I/O load (and decreases the [[write amplification]]) of the garbage collector, but becomes increasingly ineffective as the file system fills up and nears capacity.