发明名称 System and method for reading file blocks
摘要 A system and method for reading file blocks includes reading an inode associated with the file from the file system, the inode including one or more first block pointers, determining a height of a file tree associated with the file, and determining whether a value of a second block pointer selected from the one or more first block pointers is consistent with the file having been stored using a block allocation pattern. When the value of the second block pointer is consistent with the file having been stored using the block allocation pattern the method further includes pre-fetching a plurality of file blocks based on the block allocation pattern, verifying that the pre-fetched file blocks are consistent with the file tree, and retrieving one or more data blocks of the file. In some examples, the block allocation pattern corresponds to the file being stored in streaming order to consecutively and contiguously located blocks.
申请公布号 US9223791(B2) 申请公布日期 2015.12.29
申请号 US201313934154 申请日期 2013.07.02
申请人 Red Hat, Inc. 发明人 Whitehouse Steven
分类号 G06F17/30 主分类号 G06F17/30
代理机构 Haynes and Boone, LLP 代理人 Haynes and Boone, LLP
主权项 1. A method of reading blocks from a file stored in a file system, the method comprising: reading an inode associated with the file from the file system, the inode including one or more first block pointers; determining a height of a file tree associated with the file; determining whether a value of a second block pointer selected from the one or more first block pointers is consistent with the file having been stored using a block allocation pattern; and when the value of the second block pointer is consistent with the file having been stored using the block allocation pattern: pre-fetching a plurality of file blocks from the file system based on the block allocation pattern;verifying that the plurality of pre-fetched file blocks is consistent with the file tree; andretrieving one or more data blocks of the file; wherein: determining whether the value of the second block pointer is consistent with the file having been stored using the block allocation pattern comprises comparing a difference between the second block pointer and a block number of the inode to a known offset associated with the block allocation pattern; andthe known offset is pre-computed and stored in a table indexed by levels of the file tree.
地址 Raleigh NC US