10817469

Method and Apparatus for Repairing File System Directory Tree

PublishedOctober 27, 2020
Assigneenot available in USPTO data we have
InventorsBo Hu
Technical Abstract

Patent Claims
21 claims

Legal claims defining the scope of protection. Each claim is shown in both the original legal language and a plain English translation.

Claim 1

Original Legal Text

1. A method, comprising: traversing metadata of a plurality of directories; constructing N subdirectory trees according to subdirectory path information comprised in metadata of each directory of the plurality of directories, wherein for each directory of the plurality of directories, when a lower-level directory of a respective directory exists, the subdirectory path information of the respective directory comprises an identification (ID) of the lower-level directory of the respective directory, and when a higher-level directory of the respective directory exists, the metadata further comprises parent directory path information of the respective directory, wherein the parent directory path information comprises an ID of the higher-level directory of the respective directory, and N is an integer greater than or equal to 2; for each subdirectory tree, when the metadata of a sub-root directory of the respective subdirectory tree includes the parent directory path information, reconstructing, according to the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree, metadata of a higher-level directory of a level R, wherein each of the N subdirectory trees comprises a respective sub-root directory that is a root directory of the respective subdirectory tree, wherein the higher-level directory of the level R that corresponds to the respective subdirectory tree is adjacent to the sub-root directory of the respective subdirectory tree, and R is an integer greater than or equal to 1; and constructing the N subdirectory trees into one directory tree according to each respective reconstructed metadata of the higher-level directory of the level R that is adjacent to the respective sub-root directory.

Plain English Translation

This invention relates to a method for reconstructing a directory tree structure from metadata of multiple directories. The problem addressed is efficiently organizing and merging fragmented directory metadata into a coherent hierarchical structure, particularly when directories are stored or processed in isolated subdirectory trees. The method involves traversing metadata of multiple directories to extract subdirectory path information and parent directory path information. Each directory's metadata includes identifiers (IDs) of lower-level directories and, if applicable, parent directory path information with the ID of a higher-level directory. The method constructs N subdirectory trees (where N is at least 2) based on this metadata, with each subdirectory tree having a sub-root directory. For each subdirectory tree, if the sub-root directory's metadata includes parent directory path information, the method reconstructs the metadata of a higher-level directory (level R, where R is at least 1) adjacent to the sub-root directory. This reconstruction uses the parent directory path information to establish hierarchical relationships. Finally, the method merges the N subdirectory trees into a single, unified directory tree by incorporating the reconstructed metadata of the higher-level directories. This approach enables efficient reconstruction of a complete directory tree from fragmented metadata, ensuring accurate hierarchical relationships between directories.

Claim 2

Original Legal Text

2. The method according to claim 1 , wherein for each subdirectory tree, when the metadata of the sub-root directory of the respective subdirectory tree includes the parent directory path information, reconstructing, according to the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree, metadata of the higher-level directory of the level R that is adjacent to the sub-root directory of the respective subdirectory tree comprises: for each subdirectory tree, when the metadata of the sub-root directory of the respective subdirectory tree includes the parent directory path information, and when the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree comprises a first directory ID and a second directory ID, and the first directory ID is identical to a directory ID in another subdirectory tree of the N subdirectory trees, determining that the second directory ID is of the higher-level directory of the level R that is adjacent to the sub-root directory of the respective subdirectory tree, wherein the second directory ID is of a lowest-level directory in the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree; and for each subdirectory tree, when the metadata of the sub-root directory of the respective subdirectory tree includes the parent directory path information, reconstructing the metadata of the higher-level directory of the level R according to the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree.

Plain English Translation

This invention relates to a method for reconstructing directory structures in a file system, particularly when dealing with fragmented or incomplete metadata. The problem addressed is the restoration of hierarchical directory relationships when metadata for higher-level directories is missing or corrupted, ensuring data integrity and proper file organization. The method operates on a set of subdirectory trees, each with a sub-root directory containing metadata. When the metadata of a sub-root directory includes parent directory path information, the method reconstructs metadata for the higher-level directory adjacent to the sub-root directory. Specifically, if the parent directory path information contains a first directory ID and a second directory ID, and the first directory ID matches a directory ID in another subdirectory tree, the second directory ID is identified as belonging to the higher-level directory. The second directory ID is the lowest-level directory in the parent directory path information. The method then reconstructs the metadata of the higher-level directory based on this information. This approach ensures that directory hierarchies are accurately restored, even when metadata is fragmented, by leveraging cross-references between subdirectory trees. The method is particularly useful in systems where directory metadata may be incomplete or corrupted, such as in file recovery or distributed storage environments.

Claim 3

Original Legal Text

3. The method according to claim 2 , wherein for each subdirectory tree, when the metadata of the sub-root directory of the respective subdirectory tree includes the parent directory path information, reconstructing the metadata of the first directory of the level R according to the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree comprises: for each subdirectory tree, and for an i th -level directory that is a higher level directory of the sub-root directory of the respective subdirectory tree, when the metadata of the sub-root directory of the respective subdirectory tree includes the parent directory path information, determining, according to the parent directory path information of the sub-root directory of the respective subdirectory tree, that a first directory and the sub-root directory are subdirectories of the i th -level directory, wherein the first directory is between the sub-root directory of the respective subdirectory tree and the i th -level directory, and determining, according to the parent directory path information of the sub-root directory of the respective subdirectory tree, that a directory higher than the i th -level directory is parent directory of the i th -level directory; wherein i is an integer greater than or equal to 1 and less than or equal to R.

Plain English Translation

This invention relates to a method for reconstructing directory structures in a file system, particularly when metadata for directories is incomplete or corrupted. The problem addressed is the restoration of hierarchical directory relationships when only partial metadata is available, ensuring accurate reconstruction of the original directory tree structure. The method involves analyzing subdirectory trees within a file system. For each subdirectory tree, if the metadata of the sub-root directory contains parent directory path information, the method reconstructs the metadata of directories at a specified level R. This reconstruction process involves determining the hierarchical relationships between directories. For each directory at level i (where i ranges from 1 to R) that is a higher-level directory of the sub-root directory, the method checks if the sub-root directory's metadata includes parent directory path information. If so, it determines that the first directory (a directory between the sub-root directory and the i-th level directory) and the sub-root directory are subdirectories of the i-th level directory. Additionally, it identifies that a directory higher than the i-th level directory is the parent of the i-th level directory. This ensures that the directory hierarchy is accurately reconstructed based on the available metadata, even when some directory metadata is missing or corrupted. The method is particularly useful in data recovery and file system integrity restoration scenarios.

Claim 4

Original Legal Text

4. The method according to claim 1 , wherein, in the one directory tree, in a directory lower than an S th -level directory, parent directory path information of each directory comprises information about a higher-level directory of a level S, wherein S is an integer greater than or equal to 2; and wherein, in the one directory tree, parent directory path information of the S th -level directory and a directory higher than the S th -level directory comprises information about all higher-level directories.

Plain English Translation

This invention relates to directory tree structures in file systems, addressing the challenge of efficiently managing and accessing hierarchical directory paths. The method optimizes parent directory path information storage by selectively including higher-level directory references based on a configurable threshold level S (where S is an integer ≥ 2). In the directory tree, directories below the Sth-level directory store only the path information of their immediate higher-level directory (Sth-level directory). For directories at or above the Sth level, the path information includes references to all higher-level directories in the hierarchy. This approach reduces storage overhead for lower-level directories while maintaining complete path information for higher-level directories, improving efficiency in path resolution and file system operations. The method ensures that path reconstruction remains accurate while minimizing redundant storage of directory references in deep directory structures. This selective path information storage is particularly useful in large-scale file systems where directory depth can be significant, balancing storage efficiency with the need for accurate path tracking.

Claim 5

Original Legal Text

5. The method according to claim 1 , wherein in the one directory tree, a first directory of the plurality of directories is included in a level S, a second directory of the plurality of directories is included in the level S, a third directory of the plurality of directories in included in a level S-1 that is higher than the level S, and a fourth directory of the plurality of directories in included in a level S+X that is lower than the level S, where S is an integer greater than or equal to 2 and X is an integer greater than or equal to 1, a first subdirectory tree of the N subdirectory trees comprises the second directory and the third directory, and is free from including the first directory, and a second subdirectory tree of the N subdirectory trees comprises the fourth directory and is free from having the first directory, the second directory and the third directory.

Plain English Translation

This invention relates to a method for organizing and managing directory structures in a hierarchical file system. The problem addressed is the efficient partitioning and management of directory trees to optimize access, storage, and maintenance in computing systems. The method involves creating a directory tree structure where directories are organized into multiple levels, with specific directories placed at different hierarchical levels to improve system performance and usability. The directory tree includes a plurality of directories arranged across multiple levels. A first directory is placed at level S, a second directory is also at level S, and a third directory is at a higher level (S-1). A fourth directory is at a lower level (S+X), where S is an integer ≥2 and X is an integer ≥1. The structure is divided into subdirectory trees, where a first subdirectory tree contains the second and third directories but excludes the first directory. A second subdirectory tree includes only the fourth directory and excludes the first, second, and third directories. This arrangement allows for logical separation of directories, improving file system efficiency and reducing conflicts during operations like searches, deletions, or updates. The method ensures that directories are distributed across levels in a way that minimizes redundancy and enhances system performance.

Claim 6

Original Legal Text

6. The method according to claim 5 , wherein, in the one directory tree, parent directory path information included in the metadata of the first directory comprises information about the third directory, parent directory path information included in the metadata of the second directory comprises information about the third directory, and parent directory path information included in the metadata of the fourth directory comprises information about the first directory and information about the third directory.

Plain English Translation

This invention relates to directory structures in file systems, specifically addressing the challenge of maintaining accurate parent directory path information in metadata to ensure proper hierarchical relationships and efficient file system operations. The method involves a directory tree structure where directories contain metadata that includes parent directory path information. In this structure, a first directory and a second directory both have metadata that references a third directory as their parent. Additionally, a fourth directory has metadata that references both the first directory and the third directory as its parents. This configuration allows for flexible directory relationships, enabling efficient traversal and management of files and directories within the system. The inclusion of multiple parent directory references in metadata ensures that the file system can accurately track hierarchical relationships, even in complex or nested directory structures. This approach improves file system reliability and performance by reducing the risk of broken links or incorrect path references, particularly in systems where directories may have multiple parent directories or dynamic relationships. The method is particularly useful in distributed file systems, cloud storage, or any system requiring robust directory management.

Claim 7

Original Legal Text

7. The method according to claim 6 , wherein X is an integer greater than or equal to 2, and in the one directory tree, the parent directory path information included in the metadata of the fourth directory further comprises information each directory of the plurality of directories between the fourth directory and the first directory.

Plain English Translation

This invention relates to directory tree structures in file systems, specifically addressing the challenge of efficiently tracking and managing hierarchical directory relationships. The method involves a directory tree where a parent directory contains metadata that includes path information for its child directories. The metadata of a parent directory includes the path information of its immediate child directories, and this path information is recursively extended to include the paths of all intermediate directories between any child directory and the root directory. The system ensures that when a directory is accessed, its full path can be reconstructed by traversing the metadata of its parent directories, eliminating the need for centralized path storage. This approach improves efficiency in path resolution, particularly in large-scale file systems where directory traversal operations are frequent. The method is applicable in distributed file systems, cloud storage, and other environments where maintaining accurate directory hierarchies is critical. The invention enhances performance by reducing the overhead associated with path lookups and ensuring consistency in directory relationships.

Claim 8

Original Legal Text

8. The method according to claim 6 , wherein the metadata of the first directory is reconstructed, and reconstructing, according to the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree, metadata of a higher-level directory of a level R, comprises: identifying the first directory is included in the level S, and is between the fourth directory and the third directory, based on the metadata of the fourth directory.

Plain English Translation

This invention relates to a method for reconstructing directory metadata in a hierarchical file system, particularly for restoring directory structures from fragmented or incomplete metadata. The problem addressed is the loss or corruption of directory metadata, which can disrupt file system integrity and accessibility. The method involves reconstructing metadata for a first directory within a hierarchical directory structure. The reconstruction process uses metadata from a sub-root directory of a subdirectory tree to identify the first directory's position in the hierarchy. Specifically, the method determines that the first directory is located at a level S, positioned between a fourth directory and a third directory, based on the metadata of the fourth directory. This ensures accurate reconstruction of the directory's hierarchical relationships. The method leverages parent directory path information stored in the metadata of the sub-root directory to reconstruct higher-level directory metadata up to a specified level R. This approach allows for the restoration of directory structures even when some metadata is missing or corrupted, ensuring data integrity and accessibility in file systems. The technique is particularly useful in scenarios where directory metadata has been lost due to system failures or storage errors.

Claim 9

Original Legal Text

9. An apparatus, comprising: a processor; and a non-transitory computer-readable storage medium storing a program to be executed by the processor, the program including instructions for: traversing metadata of a plurality of directories; constructing N subdirectory trees according to subdirectory path information comprised in metadata of each directory of the plurality of directories, wherein for each directory of the plurality of directories, when a lower-level directory of a respective directory exists, the subdirectory path information of the respective directory comprises an identification (ID) of the lower-level directory of the respective directory, and when a higher-level directory of the respective directory exists, the metadata further comprises parent directory path information of the respective directory, wherein the parent directory path information comprises an ID of the higher-level directory of the respective directory, and N is an integer greater than or equal to 2; for each subdirectory tree, when the metadata of a sub-root directory of the respective subdirectory tree includes the parent directory path information, reconstructing, according to the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree, metadata of a higher-level directory of a level R, wherein each of the N subdirectory trees comprises a sub-root directory that is a root directory of the respective subdirectory tree, wherein the higher-level directory of the level R that corresponds to the respective subdirectory tree is adjacent to the sub-root directory of the respective subdirectory tree, and R is an integer greater than or equal to 1; and constructing the N subdirectory trees into one directory tree according to each respective reconstructed metadata of the higher-level directory of the level R that is adjacent to the respective sub-root directory.

Plain English Translation

The invention relates to a system for organizing and reconstructing directory structures in a file system. The problem addressed is the efficient management and traversal of directory hierarchies, particularly when dealing with fragmented or distributed directory metadata. The apparatus includes a processor and a non-transitory storage medium storing a program that processes directory metadata to reconstruct a unified directory tree from multiple subdirectory trees. The system traverses metadata of multiple directories to extract subdirectory path information, which includes identifiers (IDs) of lower-level directories and parent directory path information for higher-level directories. Using this metadata, the system constructs N subdirectory trees, where each subdirectory tree has a sub-root directory. For each subdirectory tree, if the sub-root directory's metadata includes parent directory path information, the system reconstructs the metadata of a higher-level directory adjacent to the sub-root directory. This reconstruction is based on the parent directory path information, which contains the ID of the higher-level directory. Finally, the system combines the N subdirectory trees into a single unified directory tree by linking each subdirectory tree to its reconstructed higher-level directory. This approach enables efficient reconstruction of directory hierarchies from fragmented metadata, ensuring accurate traversal and organization of file system structures. The system is particularly useful in distributed or decentralized file systems where directory metadata may be stored separately.

Claim 10

Original Legal Text

10. The apparatus according to claim 9 , wherein the program further includes instructions for: for each subdirectory tree, when the metadata of the sub-root directory of the respective subdirectory tree includes the parent directory path information, and when parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree comprises a first directory ID and a second directory ID, and the first directory ID is identical to a directory ID in another subdirectory tree of the N subdirectory trees, determining that the second directory ID is of the higher-level directory of the level R that is adjacent to the sub-root directory of the respective subdirectory tree, wherein the second directory ID of a lowest-level directory in the parent directory path information in the metadata of the sub-root directory of the respective directory tree; and for each subdirectory tree, when the metadata of the sub-root directory of the respective subdirectory tree includes the parent directory path information, reconstruct the metadata of the higher-level directory of the level R according to the parent directory path information in the metadata of the sub-root directory of the respective directory tree.

Plain English Translation

This invention relates to a system for reconstructing directory structures in a file storage system, particularly when metadata is incomplete or corrupted. The problem addressed is the difficulty in accurately reconstructing hierarchical directory relationships when only partial metadata is available, such as in fragmented or recovered file systems. The apparatus includes a program that processes multiple subdirectory trees to reconstruct higher-level directory metadata. For each subdirectory tree, the program checks the metadata of the sub-root directory. If the metadata contains parent directory path information, the program analyzes the directory IDs within that path. If two directory IDs are found—where the first matches an ID in another subdirectory tree—the second ID is identified as the higher-level directory adjacent to the sub-root directory. The second ID is also the lowest-level directory in the parent path of the subdirectory tree. Using this information, the program reconstructs the metadata of the higher-level directory (level R) based on the parent directory path information from the sub-root directory. This ensures that directory hierarchies are accurately restored even when some metadata is missing or corrupted, enabling proper file system navigation and data integrity. The method is particularly useful in data recovery scenarios where directory structures must be rebuilt from incomplete metadata.

Claim 11

Original Legal Text

11. The apparatus according to claim 10 , wherein the program further includes instructions for: for each subdirectory tree, and for an i th -level directory that is a higher level directory of the sub-root directory of the respective subdirectory tree, when the metadata of the sub-root directory of the respective subdirectory tree includes the parent directory path information, determining, according to the parent directory path information of the sub-root directory of the respective subdirectory tree, that a first directory and the sub-root directory are subdirectories of the i th -level directory, wherein the first directory is between the sub-root directory of the respective subdirectory tree and the i th -level directory, and determining, according to the parent directory path information of the sub-root directory of the respective subdirectory tree, that a directory higher than the i th -level directory is parent directory of the i th -level directory; wherein i is an integer greater than or equal to 1 and less than or equal to R.

Plain English Translation

The invention relates to a system for managing and organizing directory structures in a file system, particularly for efficiently determining hierarchical relationships between directories. The problem addressed is the need to accurately reconstruct directory hierarchies from metadata, especially when dealing with subdirectory trees and their parent-child relationships. The system includes a program that processes metadata associated with directories to determine their hierarchical positions. For each subdirectory tree, the program analyzes an i-th level directory, which is a higher-level directory of the sub-root directory of the respective subdirectory tree. If the metadata of the sub-root directory includes parent directory path information, the program uses this information to determine that a first directory and the sub-root directory are subdirectories of the i-th level directory, where the first directory lies between the sub-root directory and the i-th level directory. Additionally, the program identifies a directory higher than the i-th level directory as the parent directory of the i-th level directory. The integer i ranges from 1 to R, where R is the maximum depth of the directory hierarchy. This approach ensures that directory relationships are correctly established based on metadata, enabling accurate reconstruction of the file system's structure. The method is particularly useful in scenarios where directory hierarchies need to be restored or validated from stored metadata.

Claim 12

Original Legal Text

12. The apparatus according to claim 9 , wherein in the one directory tree, in a directory lower than an S th -level directory, parent directory path information of each directory comprises information about a higher-level directory of a level S, wherein S is an integer greater than or equal to 2; and wherein, in the one directory tree, parent directory path information of the S th -level directory and a directory higher than the S th -level directory comprises information about all higher-level directories.

Plain English Translation

This invention relates to a directory tree structure for file systems, addressing the problem of efficiently managing and accessing hierarchical directory paths. The system organizes directories in a tree structure where each directory contains parent directory path information. For directories below an Sth-level directory (where S is an integer ≥ 2), the parent directory path information includes only the higher-level directory of level S. For directories at or above the Sth level, the parent directory path information includes all higher-level directories. This selective inclusion of path information reduces storage overhead while maintaining traceability to key higher-level directories. The approach optimizes directory traversal and path resolution by balancing between full path storage and minimal path references, improving performance in large-scale file systems. The invention is particularly useful in systems requiring efficient directory navigation and path management, such as distributed file systems or cloud storage architectures. The selective path information storage ensures that critical higher-level directory references are always available, while lower-level directories only reference the Sth-level directory, reducing redundancy and improving scalability.

Claim 13

Original Legal Text

13. The apparatus according to claim 9 , wherein in the one directory tree, a first directory of the plurality of directories is included in a level S, a second directory of the plurality of directories is included in the level S, a third directory of the plurality of directories in included in a level S−1 that is higher than the level S, and a fourth directory of the plurality of directories in included in a level S+X that is lower than the level S, where S is an integer greater than or equal to 2 and X is an integer greater than or equal to 1, a first subdirectory tree of the N subdirectory trees comprises the second directory and the third directory, and is free from including the first directory, and a second subdirectory tree of the N subdirectory trees comprises the fourth directory and is free from having the first directory, the second directory and the third directory.

Plain English Translation

This invention relates to a hierarchical directory structure for organizing data in a computing system. The problem addressed is the need for efficient and scalable directory management, particularly in systems where directories must be logically grouped while maintaining clear hierarchical relationships. The apparatus includes a directory tree with multiple directories organized into levels. A first directory is placed at level S, a second directory is also at level S, and a third directory is at a higher level (S−1). A fourth directory is at a lower level (S+X), where S is at least 2 and X is at least 1. The structure includes multiple subdirectory trees. One subdirectory tree contains the second and third directories but excludes the first directory. Another subdirectory tree contains only the fourth directory and excludes the first, second, and third directories. This arrangement allows for flexible grouping of directories while preserving hierarchical integrity, enabling efficient traversal and management of the directory structure. The invention is particularly useful in file systems, databases, or other systems requiring organized data storage with clear parent-child relationships.

Claim 14

Original Legal Text

14. The apparatus according to claim 13 , wherein, in the one directory tree, parent directory path information included in the metadata of the first directory comprises information about the third directory, parent directory path information included in the metadata of the second directory comprises information about the third directory, and parent directory path information included in the metadata of the fourth directory comprises information about the first directory and information about the third directory.

Plain English Translation

This invention relates to a hierarchical directory structure system for managing and organizing data. The problem addressed is the need for efficient and accurate tracking of directory relationships in a file system, particularly when directories are moved or renamed, which can disrupt conventional parent-child directory linkages. The system includes a directory tree structure with multiple directories, each containing metadata that stores parent directory path information. This metadata allows the system to maintain accurate relationships between directories even if they are relocated or renamed. Specifically, the metadata of a parent directory includes path information about its child directories, and vice versa, ensuring bidirectional tracking. In one implementation, a first directory and a second directory are both child directories of a third directory. The metadata of the first and second directories includes parent directory path information pointing to the third directory. Additionally, a fourth directory, which is a child of the first directory, has metadata that includes path information for both the first and third directories. This ensures that if the first directory is moved, the system can still trace the relationship between the fourth directory and the third directory through the metadata. The bidirectional tracking mechanism prevents data loss and maintains system integrity during directory operations.

Claim 15

Original Legal Text

15. The apparatus according to claim 14 , wherein X is an integer greater than or equal to 2, and in the one directory tree, the parent directory path information included in the metadata of the fourth directory further comprises information each directory of the plurality of directories between the fourth directory and the first directory.

Plain English Translation

This invention relates to a data storage system that organizes files in a hierarchical directory structure. The problem addressed is the inefficiency in tracking and managing directory relationships, particularly when directories are nested deeply or when parent-child relationships need to be reconstructed. The system includes a directory tree structure where each directory contains metadata that includes parent directory path information. This metadata allows the system to trace the hierarchical relationships between directories. In one implementation, a fourth directory in the tree contains metadata that includes path information for all intermediate directories between itself and a first directory, ensuring that the full path can be reconstructed even if some directories are missing or corrupted. The system supports multiple directories (X ≥ 2) in the tree, allowing for complex nested structures. The metadata ensures that the parent-child relationships are preserved, enabling efficient file retrieval and system recovery. This approach improves data integrity and simplifies directory management in large-scale storage systems.

Claim 16

Original Legal Text

16. The apparatus according to claim 14 , wherein the metadata of the first directory is reconstructed, and reconstructing, according to the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree, metadata of a higher-level directory of a level R, comprises: identifying the first directory is included in the level S, and is between the fourth directory and the third directory, based on the metadata of the fourth directory.

Plain English Translation

This invention relates to a system for reconstructing directory metadata in a hierarchical file system, particularly for recovering directory structures from fragmented or corrupted metadata. The problem addressed is the loss or corruption of directory metadata, which can disrupt file system navigation and access. The system reconstructs metadata for directories in a hierarchical structure by analyzing parent directory path information stored in sub-root directories of subdirectory trees. When reconstructing metadata for a first directory at level S, the system identifies its position between a fourth directory and a third directory based on the metadata of the fourth directory. This ensures accurate reconstruction of the directory hierarchy, even if some metadata is missing or corrupted. The system also handles subdirectories by reconstructing their metadata according to their respective parent directory paths. This approach enables reliable recovery of directory structures, maintaining file system integrity and usability. The invention is particularly useful in scenarios where metadata corruption or fragmentation occurs, such as after system crashes or storage errors. The method ensures that directories are correctly positioned within the hierarchy, preserving the logical structure of the file system.

Claim 17

Original Legal Text

17. A non-transitory computer-readable storage medium storing a program to be executed by a processor, the program including instructions for: constructing N subdirectory trees according to subdirectory path information comprised in metadata of each directory of a plurality of directories, wherein for each directory of the plurality of directories, when a lower-level directory of a respective directory exists, the subdirectory path information of the respective directory comprises an identification (ID) of the lower-level directory of the respective directory, and when a higher-level directory of the respective directory exists, the metadata further comprises parent directory path information of the respective directory, wherein the parent directory path information comprises an ID of the higher-level directory of the respective directory, and N is an integer greater than or equal to 2; for each subdirectory tree, when the metadata of a sub-root directory of the respective subdirectory tree includes the parent directory path information, reconstructing, according to the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree, metadata of a higher-level directory of a level R, wherein each of the N subdirectory trees comprises a respective sub-root directory that is a root directory of the respective subdirectory tree, wherein the higher-level directory of the level R that corresponds to the respective subdirectory tree is adjacent to the sub-root directory of the respective subdirectory tree, and R is an integer greater than or equal to 1; and constructing the N subdirectory trees into one directory tree according to each respective reconstructed metadata of the higher-level directory of the level R that is adjacent to the respective sub-root directory.

Plain English Translation

This invention relates to a method for organizing and reconstructing directory structures in a file system. The problem addressed is the efficient management and reconstruction of hierarchical directory trees, particularly when dealing with fragmented or distributed directory metadata. The solution involves creating multiple subdirectory trees from metadata associated with directories, where each directory's metadata includes identifiers (IDs) for lower-level and higher-level directories. For each subdirectory tree, if the metadata of its root directory (sub-root) contains parent directory path information, the system reconstructs metadata for a higher-level directory adjacent to the sub-root. This reconstruction uses the parent directory path information, which includes the ID of the higher-level directory. Finally, the system combines the N subdirectory trees into a single unified directory tree based on the reconstructed metadata of the higher-level directories. This approach allows for scalable and flexible directory structure management, particularly useful in distributed or partitioned file systems where directory metadata may be stored separately. The method ensures that the hierarchical relationships between directories are accurately preserved during reconstruction.

Claim 18

Original Legal Text

18. The non-transitory computer-readable storage medium according to claim 17 , wherein the program further includes instructions for: for each subdirectory tree, when the metadata of the sub-root directory of the respective subdirectory tree includes the parent directory path information, and when the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree comprises a first directory ID and a second directory ID, and the first directory ID is identical to a directory ID in another subdirectory tree of the N subdirectory trees, determining that the second directory ID is of the higher-level directory of the level R that is adjacent to the sub-root directory of the respective subdirectory tree, wherein the second directory ID is of a lowest-level directory in the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree; and for each subdirectory tree, when the metadata of the sub-root directory of the respective subdirectory tree includes the parent directory path information, reconstructing the metadata of the higher-level directory of the level R according to the parent directory path information in the metadata of the sub-root directory of the respective subdirectory tree.

Plain English Translation

This invention relates to a method for reconstructing directory structures in a file system, particularly when metadata is corrupted or incomplete. The problem addressed is the loss or corruption of directory hierarchy information, which can make it difficult to reconstruct the original file system structure. The system processes a file system divided into N subdirectory trees, each with a sub-root directory containing metadata. The metadata includes parent directory path information, which consists of directory IDs representing the hierarchical path from the sub-root directory to its parent directories. The system analyzes this path information to identify relationships between subdirectory trees. For each subdirectory tree, if the metadata of its sub-root directory includes parent directory path information with a first directory ID and a second directory ID, and the first directory ID matches a directory ID in another subdirectory tree, the system determines that the second directory ID belongs to a higher-level directory adjacent to the sub-root directory. The second directory ID is the lowest-level directory in the parent directory path information. The system then reconstructs the metadata of the higher-level directory based on the parent directory path information from the sub-root directory. This allows the file system to restore the hierarchical structure even if some metadata is missing or corrupted. The method ensures that directory relationships are accurately reconstructed, maintaining the integrity of the file system.

Claim 19

Original Legal Text

19. The non-transitory computer-readable storage medium according to claim 18 , wherein the program further includes instructions for: for each subdirectory tree, and for an i th -level directory that is a higher level directory of the sub-root directory of the respective subdirectory tree, when the metadata of the sub-root directory of the respective subdirectory tree includes the parent directory path information, determining, according to the parent directory path information of the sub-root directory of the respective subdirectory tree, that a first directory and the sub-root directory are subdirectories of the i th -level directory, wherein the first directory is between the sub-root directory of the respective subdirectory tree and the i th -level directory, and determining, according to the parent directory path information of the sub-root directory of the respective subdirectory tree, that a directory higher than the i th -level directory is parent directory of the i th -level directory; wherein i is an integer greater than or equal to 1 and less than or equal to R.

Plain English Translation

The invention relates to a computer-implemented method for managing directory structures in a file system, specifically addressing the challenge of efficiently determining hierarchical relationships between directories in a multi-level directory tree. The system involves analyzing metadata associated with subdirectory trees to reconstruct directory relationships without requiring full traversal of the file system. For each subdirectory tree, the method examines an i-th level directory, which is a higher-level directory of the sub-root directory of the respective subdirectory tree. If the metadata of the sub-root directory includes parent directory path information, the system uses this information to determine that a first directory and the sub-root directory are subdirectories of the i-th level directory, where the first directory lies between the sub-root directory and the i-th level directory. Additionally, the system identifies a directory higher than the i-th level directory as the parent directory of the i-th level directory. The integer i ranges from 1 to R, where R is the maximum depth of the directory hierarchy. This approach enables efficient reconstruction of directory relationships by leveraging metadata, reducing the need for extensive file system traversal and improving performance in large-scale directory structures.

Claim 20

Original Legal Text

20. The non-transitory computer-readable storage medium according to claim 17 , wherein in the one directory tree, in a directory lower than an S th -level directory, parent directory path information of each directory comprises information about a higher-level directory of a level S, wherein S is an integer greater than or equal to 2; and wherein, in the one directory tree, parent directory path information of the S th -level directory and a directory higher than the S th -level directory comprises information about all higher-level directories.

Plain English Translation

This invention relates to a file system structure for efficiently managing directory path information in a hierarchical directory tree. The problem addressed is the inefficiency in storing and retrieving parent directory path information, particularly in large-scale file systems where traversing multiple directory levels can be computationally expensive. The system organizes directories into a tree structure where each directory contains metadata, including parent directory path information. For directories below a specified S-th level (where S is an integer ≥ 2), the parent directory path information only includes details about the S-th level directory and higher. For directories at or above the S-th level, the parent directory path information includes details about all higher-level directories. This selective inclusion of path information reduces storage overhead while maintaining the ability to reconstruct full paths when needed. The approach optimizes path resolution by minimizing redundant storage of directory information in lower-level directories. By limiting the stored path data to only the necessary higher-level directories, the system improves efficiency in path traversal and metadata management. This is particularly useful in distributed or cloud-based file systems where minimizing storage and computational overhead is critical. The method ensures that path reconstruction remains accurate while reducing the memory and processing resources required for directory operations.

Claim 21

Original Legal Text

21. The non-transitory computer-readable storage medium according to claim 17 , wherein in the one directory tree, a first directory of the plurality of directories is included in a level S, a second directory of the plurality of directories is included in the level S, a third directory of the plurality of directories in included in a level S-1 that is higher than the level S, and a fourth directory of the plurality of directories in included in a level S+X that is lower than the level S, where S is an integer greater than or equal to 2 and X is an integer greater than or equal to 1, a first subdirectory tree of the N subdirectory trees comprises the second directory and the third directory, and is free from including the first directory, and a second subdirectory tree of the N subdirectory trees comprises the fourth directory and is free from having the first directory, the second directory and the third directory.

Plain English Translation

This invention relates to a system for organizing and managing directory structures in a computer file system. The problem addressed is the inefficiency and complexity of navigating and maintaining hierarchical directory trees, particularly when dealing with large or nested directory structures. The solution involves a method for partitioning a directory tree into multiple subdirectory trees, where each subdirectory tree contains a subset of directories from the original tree while ensuring no overlaps or redundancies. The system defines a directory tree with multiple levels, where directories are organized hierarchically. A first directory is placed at level S, a second directory at the same level S, a third directory at a higher level S-1, and a fourth directory at a lower level S+X. The directory tree is then divided into at least two subdirectory trees. The first subdirectory tree includes the second and third directories but excludes the first directory. The second subdirectory tree includes the fourth directory but excludes the first, second, and third directories. This partitioning ensures that directories are logically grouped without duplication, improving file system navigation and management. The method is implemented using a non-transitory computer-readable storage medium, allowing for efficient storage and retrieval of directory structures.

Patent Metadata

Filing Date

Unknown

Publication Date

October 27, 2020

Inventors

Bo Hu

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, FAQs, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “Method and Apparatus for Repairing File System Directory Tree” (10817469). https://patentable.app/patents/10817469

© 2026 Nomic Interactive Technology LLC. Machine-readable context available at /api/llm-context/10817469. See llms.txt for full attribution policy.

Method and Apparatus for Repairing File System Directory Tree