IP Library Granted Patent US 10,235,293
Granted Patent B2
US 10,235,293 · App. 15/279,721 · Granted Mar 19, 2019

Tracking access pattern of inodes and pre-fetching inodes

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,235,293
App. No.
15/279,721
Filed
Sep 29, 2016
Granted
Mar 19, 2019
Kind
B2
Art Unit
2138
USPC
711/137
Abstract

Disclosed herein are methods, systems, and processes track access patterns of inodes, and to issue read-ahead instructions to pre-fetch inodes into memory. An inode is accessed and a directory of the inode is determined. Also determined is whether an entry for the directory exists in a global inode list. If the entry exists in the global inode list, whether a file structure of the directory is sequential or non-sequential is determined. If the entry does not exist in the global inode list, a new entry for the directory is added in the global inode list.

Claims (94)

1. A method comprising:

determining a directory of an inode;

determining whether a file structure of the directory is sequential or non-sequential;

in response to determining that the file structure of the directory is sequential, determining whether the directory comprises a sequential flag;

in response to determining that the directory comprises the sequential flag, issuing a metadata read-ahead operation for one or more inodes of a plurality of inodes in an inode list, wherein

the metadata read-ahead operation comprises a metadata read-ahead value;

intercepting a command to read one or more inodes among the plurality of inodes in the inode list, wherein

the command is associated with an input/output (I/O) operation, and

the command comprises a total number of chunks (“chunk total”) to be read in conjunction with the command;

comparing the metadata read-ahead value to the chunk total; and

in response to determining that the metadata read-ahead value is less than or equal to the chunk total, issuing an asynchronous metadata read-ahead instruction, wherein

the asynchronous metadata read-ahead instruction indicates a number of inodes to be read ahead.

2. The method of claim 1 , further comprising

determining whether an entry for the directory exists in a global inode list, wherein

the determining whether the entry for the directory exists in the global inode list comprises searching the global inode list for the entry.

3. The method of claim 1 , further comprising:

accessing the inode, wherein

the accessing is performed prior to the determining the directory of the inode.

4. The method of claim 1 , further comprising:

fetching the inode list.

5. The method of claim 1 , wherein

the I/O operation results in the command.

6. The method of claim of claim 1 , further comprising:

waiting for the I/O operation to complete, if the comparing indicates the I/O operation should complete; and

determining whether the I/O operation is complete.

7. The method of claim 6 , further comprising:

in response to determining that the I/O operation is complete, generating a queue, wherein

the queue comprises one or more remaining chunks of metadata of the chunk total, and

the one or more remaining chunks of metadata are not included in the asynchronous metadata read-ahead instruction.

8. The method of claim 1 , wherein

the inode is an on-disk inode.

9. The method of claim 6 , further comprising:

in response to determining that the I/O operation is incomplete, updating the chunk total in the metadata read-ahead operation.

10. A non-transitory computer readable storage medium comprising program instructions executable to perform a method comprising:

determining a directory of an inode;

determining whether a file structure of the directory is sequential or non-sequential;

in response to determining that the file structure of the directory is sequential, determining whether the directory comprises a sequential flag;

in response to determining that the directory comprises the sequential flag, issuing a metadata read-ahead operation for one or more inodes of a plurality of inodes in an inode list, wherein

the metadata read-ahead operation comprises a metadata read-ahead value;

intercepting a command to read one or more inodes among the plurality of inodes in the inode list, wherein

the command is associated with an input/output (I/O) operation, and

the command comprises a total number of chunks (“chunk total”) to be read in conjunction with the command;

comparing the metadata read-ahead value to the chunk total; and

in response to determining that the metadata read-ahead value is less than or equal to the chunk total, issuing an asynchronous metadata read-ahead instruction, wherein

the asynchronous metadata read-ahead instruction indicates a number of inodes to be read ahead.

11. The non-transitory computer readable storage medium of claim 10 , wherein the method further comprises:

determining whether an entry for the directory exists in a global inode list, wherein

the determining whether the entry for the directory exists in the global inode list comprises searching the global inode list for the entry; and

the inode is an on-disk inode.

12. The non-transitory computer readable storage medium of claim 10 , wherein the method further comprises:

accessing the inode, wherein

the accessing is performed prior to the determining the directory of the inode; and

fetching the inode list.

13. The non-transitory computer readable storage medium of claim 10 , wherein

the I/O operation results in the command.

14. The non-transitory computer readable storage medium of claim 10 , wherein the method further comprises:

waiting for the I/O operation to complete, if the comparing indicates the I/O operation should complete; and

determining whether the I/O operation is complete.

15. The non-transitory computer readable storage medium of claim 14 , wherein the method further comprises:

in response to determining that the I/O operation is complete, generating a queue, wherein

the queue comprises one or more remaining chunks of metadata of the chunk total, and

the one or more remaining chunks of metadata are not included in the asynchronous metadata read-ahead instruction.

16. The non-transitory computer readable storage medium of claim 14 , wherein the method further comprises:

in response to determining that the I/O operation is incomplete, updating the chunk total in the metadata read-ahead operation.

17. A system comprising:

one or more processors; and

a memory coupled to the one or more processors, wherein the memory stores program instructions executable by the one or more processors to perform a method comprising:

determining a directory of an inode;

determining whether a file structure of the directory is sequential or non-sequential;

in response to determining that the file structure of the directory is sequential, determining whether the directory comprises a sequential flag;

in response to determining that the directory comprises the sequential flag, issuing a metadata read-ahead operation for one or more inodes of a plurality of inodes in an inode list, wherein

the metadata read-ahead operation comprises a metadata read-ahead value;

intercepting a command to read one or more inodes among the plurality of inodes in the inode list, wherein

the command is associated with an input/output (I/O) operation, and

the command comprises a total number of chunks (“chunk total”) to be read in conjunction with the command;

comparing the metadata read-ahead value to the chunk total; and

in response to determining that the metadata read-ahead value is less than or equal to the chunk total, issuing an asynchronous metadata read-ahead instruction, wherein

the asynchronous metadata read-ahead instruction indicates a number of inodes to be read ahead.

18. The system of claim 17 , wherein the method further comprises:

determining whether an entry for the directory exists in a global inode list, wherein the determining whether the entry for the directory exists in the global inode list comprises searching the global inode list for the entry; and

the inode is an on-disk inode.

19. The system of claim 17 , wherein the method further comprises:

accessing the inode, wherein

the accessing is performed prior to the determining the directory of the inode; and

fetching the inode list.

20. The system of claim 17 , wherein

the I/O operation results in the command.

21. The system of claim 17 , wherein the method further comprises:

waiting for the I/O operation to complete, if the comparing indicates the I/O operation should complete; and

determining whether the I/O operation is complete.

22. The system of claim 21 , wherein the method further comprises:

in response to determining that the I/O operation is complete, generating a queue, wherein

the queue comprises one or more remaining chunks of metadata of the chunk total, and

the one or more remaining chunks of metadata are not included in the asynchronous metadata read-ahead instruction.