Dynamically configurable reverse DNLC lookup
First Claim
1. A method of operation of a data processing system including an electronic random access memory and at least one data processor coupled to the random access memory for writing data to and reading data from the random access memory, said method comprising:
- storing cache entries in the random access memory, each of the cache entries including a parent handle, a child handle, and an alphanumeric child name, the parent handle being a handle of a directory in a file system, the child handle being a handle of a subdirectory or file in the directory, and the child name being a name of the subdirectory or file;
preempting cache entries that are not frequently accessed for storing new cache entries in the random access memory;
maintaining parent hash lists of the cache entries and searching the random access memory for a child handle associated with a specified parent handle and a specified child name by searching a parent hash list indexed by a hashing of the specified parent handle and the specified child name;
maintaining child hash lists of the cache entries and searching the random access memory for a parent handle and a child name associated with a specified child handle by searching a child hash list indexed by a hashing of the specified child handle; and
inserting the new cache entries into the parent hash lists, and dynamically enabling and disabling insertion of the new cache entries into the child hash lists, so that when the insertion of the new cache entries into the child hash lists is enabled, new cache entries are inserted into the parent hash lists and are also inserted into the child hash lists, and when the insertion of the new cache entries into the child hash lists is disabled, new cache entries having child handles are inserted into the parent hash lists and are not inserted into any of the child hash lists.
9 Assignments
0 Petitions
Accused Products
Abstract
A directory name lookup cache (DNLC) provides a hashed forward mapping for finding the “child handle” associated with a “parent handle” and a “child name.” To provide an efficient reverse lookup capability, a second set of links is added to each cache entry for a “child hash list” indexed by a hashing of the child handle. For dynamically enabling and disabling the reverse mapping, when a new cache entry is added to its parent hash list, if the reverse mapping is enabled, then the new cache entry is also added to its child hash list; otherwise, the new cache entry is marked to indicate that it is not in any child hash list. To save memory, the parent hash lists and the child hash lists may share hash buckets.
-
Citations
17 Claims
-
1. A method of operation of a data processing system including an electronic random access memory and at least one data processor coupled to the random access memory for writing data to and reading data from the random access memory, said method comprising:
-
storing cache entries in the random access memory, each of the cache entries including a parent handle, a child handle, and an alphanumeric child name, the parent handle being a handle of a directory in a file system, the child handle being a handle of a subdirectory or file in the directory, and the child name being a name of the subdirectory or file; preempting cache entries that are not frequently accessed for storing new cache entries in the random access memory; maintaining parent hash lists of the cache entries and searching the random access memory for a child handle associated with a specified parent handle and a specified child name by searching a parent hash list indexed by a hashing of the specified parent handle and the specified child name; maintaining child hash lists of the cache entries and searching the random access memory for a parent handle and a child name associated with a specified child handle by searching a child hash list indexed by a hashing of the specified child handle; and inserting the new cache entries into the parent hash lists, and dynamically enabling and disabling insertion of the new cache entries into the child hash lists, so that when the insertion of the new cache entries into the child hash lists is enabled, new cache entries are inserted into the parent hash lists and are also inserted into the child hash lists, and when the insertion of the new cache entries into the child hash lists is disabled, new cache entries having child handles are inserted into the parent hash lists and are not inserted into any of the child hash lists. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A data processing system comprising:
- an electronic random access memory; and
at least one data processor coupled to the random access memory for writing data to and reading data from the random access memory; wherein said at least one data processor is programmed for storing cache entries in the random access memory, each of the cache entries including a parent handle, a child handle, and an alphanumeric child name, the parent handle being a handle of a directory in a file system, the child handle being a handle of a subdirectory or file in the directory, and the child name being a name of the subdirectory or file; wherein said at least one data processor is programmed for preempting cache entries that are not frequently accessed for storing new cache entries in the random access memory; wherein said at least one data processor is programmed for maintaining parent hash lists of the cache entries and searching the random access memory for a child handle associated with a specified parent handle and a specified child name by searching a parent hash list indexed by a hashing of the specified parent handle and the specified child name; wherein said at least one data processor is programmed for maintaining child hash lists of the cache entries and searching the random access memory for a parent handle and a child name associated with a specified child handle by searching a child hash list indexed by a hashing of the specified child handle; and wherein said at least one data processor is programmed for inserting the new cache entries into the parent hash lists, and for dynamically enabling and disabling insertion of the new cache entries into the child hash lists so that when the insertion of the new cache entries into the child hash lists is enabled, new cache entries are inserted into the parent hash lists and are also inserted into the child hash lists, and when the insertion of the new cache entries into the child hash lists is disabled, new cache entries having child handles are inserted into the parent hash lists and are not inserted into any of the child hash lists. - View Dependent Claims (8, 9, 10, 11, 12, 13, 14)
- an electronic random access memory; and
-
15. A file server comprising, in combination:
- data storage for storing a file system;
electronic random access memory; and
at least one data processor coupled to the data storage for providing a client with access to the file system, and coupled to the random access memory for writing data to and reading data from the random access memory;wherein said at least one data processor is programmed for storing cache entries in the random access memory, each of the cache entries including a parent handle, a child handle, and an alphanumeric child name, the parent handle being a handle of a directory in the file system, the child handle being a handle of a subdirectory or file in the directory, and the child name being a name of the subdirectory or file; wherein said at least one data processor is programmed for preempting cache entries that are not frequently accessed for storing new cache entries in the random access memory; wherein said at least one data processor is programmed for maintaining parent hash lists of the cache entries and searching the random access memory for a child handle associated with a specified parent handle and a specified child name by searching a parent hash list indexed by a hashing of the specified parent handle and the specified child name; wherein said at least one data processor is programmed for maintaining child hash lists of the cache entries and searching the random access memory for a parent handle and a child name associated with a specified child handle by searching a child hash list indexed by a hashing of the specified child handle; wherein said at least one data processor is programmed for responding to a request from the client for finding a file having a specified name in the file system by performing a forward lookup in the random access memory for a file handle of the file having the specified name and returning the file handle to the client; wherein said at least one data processor is programmed for responding to a request from the client for reading data from a file having a specified file handle by detecting an error upon finding that the file having the specified file handle is inaccessible from the data storage; wherein said at least one data processor is programmed for performing a reverse lookup in the random access memory to determine a pathname in the file system for the file having the specified file handle for recovery from the error; and wherein said at least one data processor is programmed for inserting the new cache entries into the parent hash lists, and for dynamically enabling and disabling insertion of the new cache entries into the child hash lists, so that when the insertion of the new cache entries into the child hash lists is enabled, new cache entries are inserted into the parent hash lists and are also inserted into the child hash lists, and when the insertion of the new cache entries into the child hash lists is disabled, new cache entries having child handles are inserted into the parent hash lists and are not inserted into any of the child hash lists. - View Dependent Claims (16, 17)
- data storage for storing a file system;
Specification