Font Size: a A A

The Optimization Of Linux Journaling File System

Posted on:2010-07-16Degree:MasterType:Thesis
Country:ChinaCandidate:Y ChenFull Text:PDF
GTID:2178360302959908Subject:Network Communication System and Control
Abstract/Summary:PDF Full Text Request
Linux supports many kinds of file systems, ranging from journaling file system to encrypting file system and Cluster File System. As the instinct file system of Linux OS, ex2 is the most widely-used not-journaling file system. In daily use, unpredictable accidents like power failure or system collapses can bring file system to inconsistence state. To solve this problem, auto run consistence-check tool, e2fsck, will bring a thorough and complete check over the whole disk, and can make out the inconsistence caused by accidents mentioned before. It promises the use of the ext2 file system.However, as the capacity of disk grows, this check becomes more and more time-consuming and troublesome. Journaling block device is added into ext2 file system. The cost of checking based on journal is negligible compared with that based on the whole disk. Thus, ext3 file system reduces obviously the time used to maintain consistence of file system when there are unpredictable accidents like power failure or system collapses.But recently, the research shows that something exists in ext3 file system on the bad embedded system. If files stored in ext3 are in common operations when there are power failures or collapses, they are still damaged or lost even after the auto run e2fsck. The whole system has to be formatted to reuse the disk with the accumulation of the error, which leads to loss of all information. These problems interrupt the stability of ext3 file system and weaken its ability of protection.This paper researches on the unique and similar data structures and file operation procedures of ext2 and ext3 file system among kinds of file systems on this point. Then three basic communication units between file system and journaling block device are taken into account. It is known that all three reactions of journaling block device are supposed to handle all situations of journal. And essential operation and procedure are analyzed: checkpoint and commit. Based on the analysis of JBD internal mechanism, it is accessed that there are two reasons: one is journal with file system lives on the same disk, and is vulnerable to disk damage, the other is the measure of asynchronous writing to improve effectiveness also makes journal more dangerous.As a result, journal as the base of repair becomes the most important issue to care. It is focused that how to shorten the time cost by journal staying in the mmemory.A pointed method is given to advance the original algorithm of JBD in kernel. The asynchronous writing is replaced with synchronous writing. Without affecting other functions in the kernel, it's supposed to strengthen the file system's ability to handle with emergencies.Embedded system ucLinux is used to test the improved kernel. It is verified that the new kernel's error rate does decrease a lot.
Keywords/Search Tags:Journal, Linux, Journaling Block Device, file system, optimization
PDF Full Text Request
Related items