Background File System Check Using Bitmap Tracking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current file system consistency checks, such as FSCK, are time-consuming and disrupt file system availability, especially in large file systems, as they require the entire file system to be unmounted and scanned, leading to prolonged downtime and performance issues.
Innovation Solution
Implementing a background FSCK process that checks file system consistency incrementally using a bitmap to track checked files, allowing access to the file system while checking, and performing in-context FSCK on accessed files to minimize downtime, using bitmaps for block ownership and snapshot management.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the entire file system is unmounted and scanned completely during FSCK, then file system consistency can be verified, but file system availability is lost and access time increases linearly with file system size
Solution Approach 1:
The patent divides the file system into individual files and uses a bitmap to track which files have been checked. Instead of checking the entire file system monolithically, the FSCK process checks files incrementally and independently, allowing other files to remain accessible. This segmentation transforms the single long unavailability period into multiple short check intervals distributed across different files.
Solution Approach 2:
The patent performs file system checks in advance before files are needed, using a background FSCK process that proactively checks files and sets bits in the FSCK bitmap. When a file is accessed, the system checks whether it has been previously checked using the bitmap, and only performs in-context FSCK if necessary. This preliminary checking minimizes the need for blocking access during file operations.
2Reliability
If the entire file system is unmounted for FSCK, then complete consistency verification is achieved, but file server productivity decreases
Solution Approach 1:
The patent enables continuous file system checking without interrupting file server operations. The background FSCK process continuously checks files in the background, and the in-context FSCK performs checks during normal file access operations. This continuous checking approach maintains file system reliability while keeping the file server productive and available throughout the entire process.
Solution Approach 2:
The file system performs its own consistency checks without requiring external intervention or complete unmounting. The FSCK process integrates with the normal file access path, checking files as they are accessed and using the FSCK bitmap to track progress. This self-service mechanism maintains both consistency verification and service availability simultaneously.
3Reliability
If FSCK is performed on large file systems, then consistency is verified, but the time required increases linearly with file system size
Solution Approach 1:
The patent segments the large file system into individual files and uses a bitmap to track checking progress. Each file can be checked independently and in parallel, transforming the linear time complexity of checking the entire file system into a parallelizable operation. The overall FSCK time becomes determined by the slowest individual file check rather than the sum of all file checks.
Solution Approach 2:
The patent implements partial FSCK by checking only the portion of the file system that is necessary. The FSCK bitmap tracks which files have been checked, and the system can determine when sufficient coverage has been achieved. This partial checking approach reduces the total duration compared to requiring complete verification of every single file in the entire file system.
Data Source
AI summary
A system and method for performing File System checKing (FSCK) allows a file system to be accessed while the file system is being checked for consistency in the background. In the event that a file is accessed prior to having been checked for consistency by the background FSCK process, the background FSCK process is interrupted, and an in-context FSCK is performed on the accessed file. In addition, an in-context FSCK method and system is described which uses a snapshot block bitmap, FSCK block bitmap and FS block bitmap to check block consistency in the context of handling a block access to handle consistency and corruption issues as part of the file access.


