摘要 |
The present invention discloses a method and device for recovering erroneous data, which belong to the field of computers. The method includes: when data in a storage block that is included in a solid state disk is read, performing a first error check on data on a certain page of the storage block to acquire erroneous data on the page; if a first number of pieces of the erroneous data on the page is smaller than or equal to a preset first threshold, performing an error checking and correction ECC recovery on the data on the page; and if the first number is greater than the preset first threshold, acquiring data from spare space according to a storage position of the erroneous data on the page and a fixed entry corresponding to the storage block, and replacing the erroneous data on the page with the acquired data, where the fixed entry includes a storage position of each data stored in the spare space. The device includes: a first acquiring module, a first recovering module and a first replacing module. According to the present invention, a probability of occurrence of uncorrectable faults may be greatly decreased, so as to avoid simply labeling the storage block as a bad block. |