Journaling File System
A journaling file system
is a file system that keeps track of changes not yet committed to the file system’s main part by recording the intentions of such changes in a data structure known as a “journal”, which is usually a circular log
.
There are two methods, physical journals or logical journals, to maintain and operate logs in file system. Besides, you can use alternative methods: (1)Software updates, (2)Log-structured file systems, or (3)Copy-on-write file systems to instead JFS.
In my view, JFS is a log based file system, likes a transaction system which will replay the log when recovering. But thats will bring a two-times write penalty (one to file, another to log).
Shadowing Page
In computer science, shadow paging is a technique for providing atomicity and durability (two of the ACID properties) in database systems. A page in this context refers to a unit of physical storage (probably on a hard disk), typically of the order of 1 to 64 KiB.
Soft Update
Soft updates is an approach to maintaining file system meta-data integrity in the event of a crash or power outage. Soft updates work by tracking and enforcing dependencies among updates to file system meta-data. Soft updates are an alternative to the more commonly used approach of journaling file systems.
Soft Updates increases file system efficiency by ordering the disk writes so that every write creates a consistent state.
This allows all writes to happen asynchronously and to avoid seeks wherever possible.
There exists less documents about soft update, and I cannot understand the details of the procedures when doing soft update. Emmmm, I will complete this chapter in the future.
Log-structured file systems
A log-structured filesystem is a file system in which data and metadata are written sequentially to a circular buffer, called a log. This concept is similar with JFS, but the difference is that data in LSFS is stored in log. A LSFS will append its data to the head of log and treats its storage as a circular log
.
- Pros and Cons:
- Write throughput on optical and magnetic disks is improved because they can be batched into large sequential runs and costly seeks are kept to a minimum.
- Writes create multiple, chronologically-advancing versions of both file data and meta-data. Some implementations make these old file versions nameable and accessible, a feature sometimes called time-travel or snapshotting. This is very similar to a versioning file system.
- 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.
Reference
- [1]. Wikipedia
- [2]. Xu, Jian, and Steven Swanson. “NOVA: a log-structured file system for hybrid volatile/non-volatile main memories.” USENIX conference on file and storage technologies (2016): 323-338.
- [3]. Josephson, William, et al. “DFS: A file system for virtualized flash storage.” usenix conference on file and storage technologies 6.3 (2010).
- [4]. Balmau, Oana Maria, et al. “TRIAD: Creating Synergies Between Memory, Disk and Log in Log Structured Key-Value Stores.” USENIX ATC” 17. No. EPFL-CONF-228863. 2017.
- [5]. Ganger, Gregory R., et al. “Soft updates: a solution to the metadata update problem in file systems.” ACM Transactions on Computer Systems 18.2 (2000): 127-153.