File System Inode Block Discard for Flash Storage Ghost Pages
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The conventional Ext4 file system fails to effectively discard metadata blocks during file deletion, leading to ghost pages that negatively impact flash storage performance and durability due to unnecessary data retention and high write amplification factors.
Innovation Solution
A data discard method that executes a discard command for both inode and data blocks, checking bit values in inode blocks to invalidate all ghost pages, thereby resolving the semantic gap between the file system and flash storage by ensuring complete metadata invalidation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the conventional Ext4 file system deletes only data blocks but retains metadata blocks, then the file deletion process is simple, but ghost pages remain in flash storage causing performance degradation and reduced durability
Solution Approach 1:
The patent applies the discarding principle by implementing a comprehensive discard mechanism that not only deletes data blocks but also actively invalidates metadata blocks (inode blocks) when all inodes within them are deleted. The file system checks whether all inodes in an inode block are deleted and sends discard commands to the flash storage controller to clear ghost pages, thereby improving storage durability without significantly increasing operational complexity
Solution Approach 2:
The patent implements feedback by introducing a verification mechanism that checks the deletion status of all inodes within an inode block before issuing discard commands. The file system monitors the state of inode bitmap blocks to determine whether metadata blocks should be discarded, creating a feedback loop that ensures complete garbage collection and eliminates ghost pages while maintaining systematic control over the discard process
2Productivity
If the file system executes discard commands for all metadata blocks, then ghost pages are completely eliminated, but the write amplification factor increases due to unnecessary data rewriting
Solution Approach 1:
The patent applies partial action by selectively discarding only those metadata blocks (inode blocks) where all inodes have been deleted, rather than discarding all metadata blocks indiscriminately. The system performs a partial check on inode deletion status and issues discard commands only when necessary, thereby improving garbage collection efficiency while minimizing unnecessary write operations and reducing write amplification
Solution Approach 2:
The patent implements local quality by applying different discard strategies to different metadata blocks based on their specific content and usage state. Each inode block is evaluated individually to determine whether it contains deleted inodes, and discard commands are issued locally only to those blocks that require cleaning, rather than applying a uniform discard policy across all metadata blocks
3Reliability
If the file system checks all inode bit values to determine discard necessity, then complete metadata invalidation is achieved, but the processing time and computational overhead increase
Solution Approach 1:
The patent applies preliminary action by maintaining an inode bitmap block that pre-records the deletion status of all inodes in advance. When a discard decision needs to be made, the system simply checks the pre-computed bitmap data rather than performing complex real-time analysis, thereby achieving complete metadata invalidation verification while minimizing processing time and computational overhead during the actual discard operation
Data Source
AI summary
Provided are a data discard method for a file system and a memory management apparatus thereof. Specifically, the data discard method for a file system includes: unlinking an inode and a data block corresponding to a file stored in a storage from among inodes and data blocks in a file system when a kernel event of deleting the file occurs; updating state values for the unlinked inode and data block, respectively, to a bitmap block of the file system; checking bit values of all of inodes in an inode block including the updated inode from among inode blocks of the file system; and transmitting discard commands with respect to the inode block including the updated inode and the data block, respectively, to the storage if all of the inodes of the inode block are clean bits as a result of the check.


