×

Direct or indirect mapping policy for data blocks of a file in a file system

  • US 8,903,772 B1
  • Filed: 10/25/2007
  • Issued: 12/02/2014
  • Est. Priority Date: 10/25/2007
  • Status: Active Grant
First Claim
Patent Images

1. A method of operating a file server for read or write access to data of a file, the file including multiple data blocks containing data of the file, and the file further including an inode containing metadata of the file, said method comprising:

  • reading or writing to the file when the file is organized in a direct mapping state in which a logical extent of the file is mapped to the multiple data blocks of the file without access to any indirect block of the file;

    converting the file from the direct mapping state to an indirect mapping state by converting mapping information for the file in the direct mapping state to mapping information for the file in the indirect mapping state, the mapping information for the file in the indirect mapping state including at least one indirect block of the file, said at least one indirect block of the file mapping a portion of the logical extent of the file to some of the multiple data blocks of the file; and

    thenreading or writing to the file once the file has been converted from the direct mapping state to the indirect mapping state by accessing said at least one indirect block to obtain mapping information for reading data from or writing data to at least one of the data blocks of the file;

    wherein the inode of the file includes a mapping flag indicating whether the file is organized in the direct mapping state or the indirect mapping state, and wherein the method further includes the file server responding to a request for access to a specified offset in the file by accessing the mapping flag to select either a direct mapping procedure for mapping the specified offset to a respective one of the data blocks containing data of the file or an indirect mapping procedure for mapping the specified offset to a respective one of the data blocks containing data of the file.

View all claims
  • 9 Assignments
Timeline View
Assignment View
    ×
    ×