Patent ID: 8261010

Claim:
A method for distributing a log block associativity in a log buffer-based flash translation layer (FTL) of a flash memory with physical blocks which include a plurality of data blocks which are identified by different logical block numbers and a plurality of log blocks which are identified by different logical log block numbers, the method comprising: if a write request to write a page p into a log block is generated, checking whether a log block associated with a corresponding data block that the write request is generated exists or not by checking a log block mapping table which stores mapping information between the data blocks and the log blocks, where the associativity of each of the plurality of log blocks to a data block is set to equal to or less than a predetermined value K in advance, and K is a natural number; if a log block associated with a corresponding data block that the write request is generated exists, checking whether the associated log block is a random log block or a sequential log block; if the associated log block is a random log block, writing data that the write request is generated in a first free page of the random log block, wherein the plurality of data blocks and the plurality of log blocks are not grouped, and the sequential log block can be transformed into the random log block; and if a log block associated with a corresponding data block that the write request is generated does not exist, writing data that the write request is generated to increase the associativity of a log block to a data block, wherein the writing data that the write request is generated to increase the associativity of a log block to a data block includes if a log block that a switch merge is possible exists, writing data that the write request is generated in a new log block after performing a switch merge, if a log block that a switch merge is possible does not exist and a free log block exists, writing data that the write request is generated in an available free log block, if the switch merge is impossible and all log blocks are associated with at least one data block, determining whether the associativity of a currently allocated log block reaches the predetermined value K or not or an offset of data that the write request is currently generated is 0 or not, and if the associativity of a currently allocated log block does not reach the predetermined value K or an offset of data that the write request is currently generated is not 0, selecting a log block which has most free pages among log blocks having a minimum associativity to write data that the write request is generated.