Patent ID: 8285967
Filing Date: 2012-10-09
Classification: G06F

Abstract:
1. A method of operating a storage server in a data network for read or write access to data of a file, the file including a set of data blocks containing data of the file, and the file further including an inode containing metadata of the file, the method comprising the steps of: creating the file in a direct mapped mode, wherein the direct mapped mode indicates that an address of each data block of the set of data blocks of the file is arithmetically computed by using a pre-defined function, wherein each data block of the set of data blocks is allocated on the storage server at the time the file is created; responsive to a write request directed to the file in the direct mapped mode by a client of the storage server to write to a new data block, converting the file from the direct mapped mode to a partial mapped mode by allocating a new indirect block, wherein the new indirect block includes a set of data block pointers, wherein an address of the new data block is stored in a data block pointer of the set of data block pointers of the new indirect block; and performing an I/O request on the file in the partial mapped mode, wherein the I/O request includes reading to the file and writing to the file, wherein the partial mapped mode indicates that a first portion of the file is in an indirect mapped mode and a second portion of the file is in the direct mapped mode, wherein data of the first portion of the file in the indirect mapped mode is accessed by performing an address lookup operation; wherein the inode of the file includes an inode mapping flag, wherein the inode mapping flag indicates whether the file is in the direct mapped mode, wherein the inode mapping flag of the file in the direct mapped mode indicates that an address of each data block of the set of data blocks of the file is arithmetically computed by using the pre-defined function; wherein the inode of the file includes a set of indirect block pointers, wherein each indirect block pointer of the set of indirect block pointers includes an indirect block mapping flag and a set of data block pointers, wherein the indirect block mapping flag of each indirect block pointer of the set of indirect block pointers indicates whether the indirect block pointer is in a direct mapped state, wherein the direct mapped state indicates that each data block pointer of the set of data block pointers of the indirect block pointer is arithmetically computed by using the pre-defined function.