Journaling File System
Updating files and directories is not an inherently atomic operations and is susceptible to failure at many steps in the process.
If the process of updation fails before completion (like power loss), then data can be corrupted.
For example, writing a huge file involves following steps:
- Creating a directory entry.
- Estimating number of inodes.
- Creating inodes and transferring actual data to the inodes.
Recovering from such a corrupted system can take a very long time if all the directories and inodes need to be checked.
A journaled file system solves this problem by creating a journal of the changes it plans to do.
After a successful operation, the entry is removed from the journal or marked as complete.
If the operation was unsuccessful, the entry remains in the journal and the system can just read the journal to quickly jump to the affected file.
Read full article from File Systems - PrismoSkills
No comments:
Post a Comment