Patent ID: 8386698
Filing Date: 2013-02-26
Classification: G06F

Abstract:
1. A data accessing method, suitable for a flash memory, wherein the flash memory has a plurality of physical blocks, the data accessing method comprising: logically grouping the physical blocks into a data area, a spare area, and a random area; configuring a plurality of logical blocks to map to the physical blocks of the data area; determining whether a new data is a continuous data when a write command and the new data are received from a host, wherein the new data belongings to a first logical block among the logical blocks and a first physical block among the physical blocks of the data area maps to the first logical block; selecting one of the physical blocks from the spare area to serve as a substitute physical block corresponding to the first physical block and writing the new data into the substitute physical block when the new data is the continuous data; determining whether a number of physical blocks serving as the substitute physical block is a predetermined number when the new data is not the continuous data; temporarily writing the new data into one of the physical blocks in the random area when the number of the physical blocks serving as the substitute physical block is the predetermined number, wherein the one of the physical blocks in the random area stores data belonging to a plurality of logical blocks among the logical blocks; and selecting one of the physical blocks from the spare area as the substitute physical block corresponding to the first physical block and writing the new data into the substitute physical block when the number of the substitute physical block is not the predetermined number.