Directory Inode Block Reclamation for Filesystem Storage
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional computer systems fail to release filesystem blocks allocated to directory inode structures even when directories become empty, leading to increased inode structure size and decreased performance in accessing directory entries, as well as a depletion of available blocks.
Innovation Solution
Implement a method to automatically reclaim filesystem blocks from a directory's inode structure and return them to a pool of free blocks when the directory becomes empty, by performing a directory check operation and updating the entry count field to determine the number of valid directory entries, and reclaiming blocks when the count reaches zero.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the operating system invalidates directory entries by replacing inode numbers with zeroes, then deleted files are marked as removed, but the allocated filesystem blocks are never released back to the system
Solution Approach 1:
The patent implements a feedback mechanism by periodically checking the entry count field of directory inode structures to detect when directories become empty. This feedback loop triggers the block reclamation process, ensuring that filesystem blocks are released back to the available pool when no longer needed, thus resolving the contradiction between maintaining deletion reliability and preserving block availability
Solution Approach 2:
The system performs self-service by automatically detecting empty directories through the entry count field and reclaiming their blocks without requiring external intervention. The operating system monitors its own directory structures and autonomously releases blocks from empty directories, eliminating the need for manual block management while preventing block depletion
2Quantity of substance
If filesystem blocks are continuously allocated to directory inode structures, then directory entries can be stored, but the size of the inode structure increases over time and performance deteriorates
Solution Approach 1:
The patent applies dynamics by making the inode structure size adaptable rather than static. When directories become empty, the system dynamically reclaims blocks and reduces the inode structure size back to its original allocation. This dynamic adjustment ensures that directory access performance is maintained by preventing unnecessary growth of inode structures while still providing adequate storage capacity when needed
3Stability of the object's composition
If the operating system does not release blocks from empty directories, then allocated blocks are retained for potential future use, but the supply of available blocks decreases and system resources are wasted
Solution Approach 1:
The patent implements discarding and recovering by releasing filesystem blocks from empty directory inode structures back to the available block pool. The system discards blocks that are no longer needed (from empty directories) and recovers them for reuse, thereby preventing resource waste while maintaining stable block allocation for actively used directories
Data Source
AI summary
A technique manages filesystem blocks of a filesystem. The technique involves modifying an inode structure which identifies a filesystem directory, the directory's inode structure currently including a set of filesystem blocks which was allocated to the directory's inode structure to hold filesystem data. The technique further involves, after modifying the directory's inode structure, performing a directory check operation to determine whether the filesystem directory is empty. The technique further involves reclaiming, from the directory's inode structure, the set of filesystem blocks which was allocated to the directory's inode structure to hold the filesystem data when a result of the directory check operation indicates that the filesystem directory is empty, and not reclaiming the set of filesystem blocks from the directory's inode structure when the result of the directory check operation indicates that the filesystem directory is not empty.


