Hard Link Database for Fast Reverse Lookup

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional file systems face difficulties in efficiently performing reverse lookups to find all pathnames for files with multiple hard links, as the directory structure is not optimized for this purpose, leading to challenges in error recovery and exception handling.

Innovation Solution

A hard link database is implemented, maintaining a one-to-one correspondence between regular files with multiple hard links and hard link database files, allowing for efficient reverse lookups by storing addressing information and using this information to address hard links, thereby facilitating the retrieval of all pathnames for a specified regular file.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional file system directory structure is used, then the file system is simple to implement, but reverse lookup efficiency deteriorates when files have multiple hard links

Engineering Contradiction:
Improvereverse lookup efficiencyVSAvoidfile system structure complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the file system by introducing a separate hard link database that is distinct from the conventional directory structure. This database specifically handles hard link relationships, allowing reverse lookups to be performed efficiently without complicating the overall file system architecture. The hard link database stores inode numbers and their corresponding pathnames separately, enabling targeted optimization for multi-hard link scenarios.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a hard link database as an intermediary component between the file system manager and the directory structure. This intermediary stores and manages hard link information, acting as a mediator that facilitates efficient reverse lookups without requiring modifications to the core directory hierarchy. The database serves as a lookup table that maps inodes to pathnames, decoupling the reverse lookup function from the directory traversal process.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Loss of time

If directory hierarchy traversal is used for reverse lookup, then the implementation is straightforward, but the time required for reverse lookup increases with file system size

Engineering Contradiction:
Improvereverse lookup timeVSAvoiderror recovery speed
Core Design Contradiction:
Loss of timeVSProductivity

Solution Approach 1:

The patent applies preliminary action by pre-computing and storing the relationships between inodes and pathnames in the hard link database before reverse lookups are needed. When hard links are created or modified, the database is updated in advance, so that subsequent reverse lookups can retrieve pathnames immediately without traversing the directory hierarchy. This pre-positioning of data eliminates the time-consuming traversal process.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a copy of the essential hard link information (inode numbers and pathnames) in a separate database structure. Instead of traversing the original directory hierarchy to find pathnames, the system queries this copied representation which is optimized for reverse lookups. The hard link database contains duplicate copies of pathname information that can be retrieved directly without accessing the parent directory structure.

Inventive Principle:
Principle #26Copying

3Reliability

If conventional directory structure is used, then the system is easy to maintain, but reliability of error recovery deteriorates when files have multiple hard links

Engineering Contradiction:
Improveerror recovery reliabilityVSAvoiddata structure complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements feedback mechanisms by maintaining the hard link database in sync with the file system state. When files are created, deleted, or have hard links added or removed, the database is automatically updated to reflect current relationships. This feedback loop ensures that the database always contains accurate information about hard link associations, enabling reliable error recovery even in complex multi-hard link scenarios.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent replaces the mechanical process of directory hierarchy traversal with a database query mechanism. Instead of systematically searching through parent directories to find pathnames, the system uses the hard link database which stores pre-processed mapping information. This substitution of the lookup mechanism with a dedicated database structure improves reliability by ensuring consistent and accurate retrieval of pathname information for error recovery operations.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS9104675B1Inode to pathname support with a hard link database
Publication Date: 2015.08.11 EMC IP HLDG CO LLC
  • US9104675B1 patent drawing
  • US9104675B1 patent drawing
  • US9104675B1 patent drawing

AI summary

For enabling a fast reverse lookup of parent directories storing records of hard links to a specified regular file, a file system manager maintains a hard link database (HLDB) storing information for addressing hard links to the regular files having multiple hard links. The HLDB contains a corresponding HLDB file for each regular file having multiple hard links. In a preferred implementation, the inode of each regular file stores the addressing information for one hard link to the regular file, a corresponding HLDB file stores the addressing information for other hard links to the regular file, each HLDB file is a directory accessed by invoking file system manager directory access routines, and the HLDB has a directory tree providing a multi-level hash index for searching the HLDB given the inode number of a regular file.